Removing XPCOMUtils.defineLazyGetter

892 views
Skip to first unread message

Gregory Pappas

unread,
Jan 18, 2024, 1:28:57 AM1/18/24
to firef...@mozilla.org
Good morning everyone! I have some information to share,

In bug 1805288, Arai added ChromeUtils.defineLazyGetter, which replaced the underlying implementation of XPCOMUtils.defineLazyGetter.

In bug 1845311, most uses of XPCOMUtils.defineLazyGetter were replaced with ChromeUtils.defineLazyGetter. This cut down the number of files that import XPCOMUtils.sys.mjs a lot.

Finally, in bug 1872922, the last few uses of XPCOMUtils.defineLazyGetter were replaced and a new ESLint rule was added which will reject new uses of XPCOMUtils.defineLazyGetter in the tree.

The goal is to completely remove XPCOMUtils.defineLazyGetter, so any out-of-tree code that depends on it will need to be updated to use ChromeUtils.defineLazyGetter instead.

Please subscribe to the tracking bug 1820099 if you are interested.

Gregory Pappas

unread,
Feb 14, 2025, 4:57:39 AMFeb 14
to firef...@mozilla.org, Gregory Pappas
Update: XPCOMUtils.defineLazyGetter was removed in Firefox 137 (bug 1875216)
Reply all
Reply to author
Forward
0 new messages