Open Bug 1501127 Opened 6 years ago Updated 8 months ago

Remove unnecessary calls to importGlobalProperties

Categories

(Core :: DOM: Bindings (WebIDL), enhancement, P3)

enhancement

Tracking

()

People

(Reporter: nika, Unassigned)

References

Details

Since bug 1489301 all interfaces exposed on Window are also exposed on BackstagePass. This should mean that most calls to importGlobalProperties are no longer needed.

We should also change https://searchfox.org/mozilla-central/rev/fcfb479e6ff63aea017d063faa17877ff750b4e5/js/xpconnect/src/XPCComponents.cpp#2342 to assert if we have a BackstagePass global.

See https://phabricator.services.mozilla.com/D9403#224288
N.B. We also need to remove unnecessary XPCOMUtils.defineLazyGlobalGetters calls.
Depends on: 1502048
Blocks: 1415483
Priority: -- → P3
Depends on: 1508322
No longer blocks: 1415483
Depends on: 1415483
I've been working on a patch to remove some of these instances in bug 1415483. During this process I learned that currently we can't remove this everywhere:

- sjs files used in our test suites, still need to import the global properties. I'm not sure exactly how these are run.
- Child process files (e.g. toolkit/components/extensions/child/ext-userScripts.js)

I'm not sure if we can yet remove items not in the non-privileged list as well, e.g. fetch, crypto.
Depends on: 1646183
Depends on: 1777504
No longer depends on: 1777504
Severity: normal → S3
Depends on: 1858148
Depends on: 1863204
You need to log in before you can comment on or make changes to this bug.