Closed Bug 1541508 Opened 6 years ago Closed 2 years ago

Expose nsIEnvironment through Services.env

Categories

(Core :: XPCOM, task, P5)

task

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: bgrins, Assigned: beth)

References

Details

Attachments

(22 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

This is used in a bunch of places that could be simplified if we moved this into Services: https://searchfox.org/mozilla-central/search?q=nsIEnvironment&path=.

Type: defect → task
Priority: -- → P5

Moving to "Core :: XPCOM" from to consider if this may be worth doing.

Severity: normal → N/A
Component: General → XPCOM
Product: Toolkit → Core

IIRC all you'd need to do for this is to add js_name and interfaces fields to the static component registration: https://searchfox.org/mozilla-central/rev/685203e4bc211073284f3c36f7f3d34f0953bb9c/xpcom/threads/components.conf#8-13, if someone is interested in doing this cleanup.

Assignee: nobody → brennie

Depends on D160137

Depends on D160140

Depends on D160147

Depends on D160149

Depends on D160152

Thanks a lot for doing this nice cleanup!

Should this new Services.env be added to the list in https://searchfox.org/mozilla-central/source/tools/lint/eslint/eslint-plugin-mozilla/lib/services.json to have eslint catch it when it should be used but is not? (apologies if you are already doing it and I missed it)

Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a1896eacb6f1 Expose nsIEnvironment as Services.env r=xpcom-reviewers,kmag https://hg.mozilla.org/integration/autoland/rev/2c59d66f43e4 Use Services.env in browser/ r=mossop https://hg.mozilla.org/integration/autoland/rev/e944e706a523 Use Services.env in devtools/ r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/44ccfeca7364 Use Services.env in dom/ r=emilio https://hg.mozilla.org/integration/autoland/rev/c4374a351356 Use Services.env in extensions/ r=extension-reviewers,robwu https://hg.mozilla.org/integration/autoland/rev/0bfc7dd85c62 Use Services.env in gfx/ r=botond https://hg.mozilla.org/integration/autoland/rev/740010cb005c Use Services.env in layout/ r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/8bd08a62a590 Use Services.env in memory/ r=mccr8 https://hg.mozilla.org/integration/autoland/rev/c1279c3d674c Use Services.env in mobile/ r=geckoview-reviewers,m_kato https://hg.mozilla.org/integration/autoland/rev/7d44f6e2644c Use Services.env in netwerk/ r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/2c599ee639c4 Use Services.env in remote/ r=whimboo,webdriver-reviewers https://hg.mozilla.org/integration/autoland/rev/6098e2eb62ea Use Services.env in security/ r=keeler https://hg.mozilla.org/integration/autoland/rev/2e7db4aa8d4f Use Services.env in services/ r=Gijs https://hg.mozilla.org/integration/autoland/rev/fa40dded133e Use Services.env in testing/ r=jmaher,perftest-reviewers,sparky https://hg.mozilla.org/integration/autoland/rev/b3d8e92f50c2 Use Services.env in toolkit/ r=Gijs,application-update-reviewers,nalexander https://hg.mozilla.org/integration/autoland/rev/6bb9360473f7 Use Services.env in tools/ r=marco https://hg.mozilla.org/integration/autoland/rev/aa612a5e9ef7 Use Services.env in uriloader/ r=Gijs https://hg.mozilla.org/integration/autoland/rev/0bf7514845db Use Services.env in widget/ r=Gijs https://hg.mozilla.org/integration/autoland/rev/08476fa2bc27 Use Services.env in xpcom/ r=xpcom-reviewers,kmag

Backed out for causing xpcshell failures on test_notHeadlessByDefault.js

Lint failure log: https://treeherder.mozilla.org/logviewer?job_id=395186846&repo=autoland

Flags: needinfo?(brennie)
Blocks: 1801873
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f7c5da72773e Expose nsIEnvironment as Services.env r=xpcom-reviewers,kmag https://hg.mozilla.org/integration/autoland/rev/79044f07da6f Use Services.env in browser/ r=mossop https://hg.mozilla.org/integration/autoland/rev/13ab592d9fc7 Use Services.env in devtools/ r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/422102d31f7d Use Services.env in dom/ r=emilio https://hg.mozilla.org/integration/autoland/rev/f57eac075fbe Use Services.env in extensions/ r=extension-reviewers,robwu https://hg.mozilla.org/integration/autoland/rev/c52ce5a1b79d Use Services.env in gfx/ r=botond https://hg.mozilla.org/integration/autoland/rev/7a1f0febe1bc Use Services.env in layout/ r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/a502617685ab Use Services.env in memory/ r=mccr8 https://hg.mozilla.org/integration/autoland/rev/784c91d51e52 Use Services.env in mobile/ r=geckoview-reviewers,m_kato https://hg.mozilla.org/integration/autoland/rev/8c8d647347e8 Use Services.env in netwerk/ r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/4a9ca69a0d29 Use Services.env in remote/ r=whimboo,webdriver-reviewers https://hg.mozilla.org/integration/autoland/rev/92fea1a71ea3 Use Services.env in security/ r=keeler https://hg.mozilla.org/integration/autoland/rev/2fba28997d4b Use Services.env in services/ r=markh,Gijs https://hg.mozilla.org/integration/autoland/rev/cd17720763b6 Use Services.env in testing/ r=jmaher,perftest-reviewers,sparky https://hg.mozilla.org/integration/autoland/rev/6c1df04495c1 Use Services.env in toolkit/ r=Gijs,application-update-reviewers,nalexander https://hg.mozilla.org/integration/autoland/rev/193790f0eeab Use Services.env in tools/ r=marco https://hg.mozilla.org/integration/autoland/rev/d6a979c61480 Use Services.env in uriloader/ r=Gijs https://hg.mozilla.org/integration/autoland/rev/576387596194 Use Services.env in widget/ r=Gijs https://hg.mozilla.org/integration/autoland/rev/641e9a674452 Use Services.env in xpcom/ r=xpcom-reviewers,kmag
Pushed by mlaza@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/af58a74ada19 Use SpecialPowers.Services in helper_transform_end_on_keyboard_scroll.html. CLOSED TREE
Pushed by mlaza@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b3bebb9a12f9 Use SpecialPowers.Cc in helper_transform_end_on_keyboard_scroll.html to avoid macOS test timeouts. CLOSED TREE
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/e5532f1e88ca Port Bug 1541508 - Expose nsIEnvironment through Services.env. r=mkmelin DONTBUILD

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

Flags: needinfo?(brennie)
Blocks: 1802605
Regressions: 1803508
Pushed by thunderbird@calypsoblue.org: https://hg.mozilla.org/comm-central/rev/9b4bdd165db5 Port Bug 1541508 - Expose nsIEnvironment through Services.env. r=mkmelin
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: