Closed Bug 1686616 Opened 4 years ago Closed 2 years ago

Migrate all Services.py interfaces to components.conf

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: Gankra, Assigned: Gankra)

References

Details

Attachments

(14 files, 4 obsolete 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

Services.py has effectively been replaced by the more robust components.conf system. We should deprecate the former because it's slower and less safe.

Blocks: 1686159
Assignee: nobody → a.beingessner

Basically all mechanical find-replace with a few hand fixups. Services.py
is still needed to generates services.rs, but I've deleted everything
that Rust doesn't use (almost everything).

These services had their name added to components.conf:

  • GfxInfo
  • ThirdPartyUtil
  • History
  • HttpActivityDistributor
  • UUIDGenerator
  • ServiceWorkerManager
  • PermissionManager

These services were added to componenets.conf under a different name:

  • DirectoryService => Directory
  • IOService => IO
  • StringBundleService => StringBundle
  • CacheStorageService => CacheStorage
  • StreamTransportService => StreamTransport
  • SocketTransportService => SocketTransport

These preferences weren't migrated to components.conf because only Rust
code uses them:

  • RemoteAgent
  • XULRuntime
  • PrefService

These services weren't migrated to components.conf because they're unused:

  • ToolkitChromeRegistry (used as ChromeRegistry)
  • XULChromeRegistry (used as ChromeRegistry)
  • Bits (completely unused)

These services were already available in components.conf but are still
used by rust code:

  • URIFixup

These services weren't migrated because they will be handled in
subsequent patchsets:

  • ObserverService

For the record, the following Services are being used by Rust code
and must remain until a Rust version of Components.h is written:

  • RemoteAgent
  • XULRuntime
  • PrefService
  • URIFixup
  • ObserverService
  • DirectoryService
  • ThirdPartyUtil
Attachment #9199411 - Attachment is obsolete: true
Pushed by abeingessner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2473a904aa80 register all Services.py services with components.conf. r=kmag,necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/8d41504bf834 make GfxInfo use Components instead of Services. r=kmag https://hg.mozilla.org/integration/autoland/rev/9948eb32fcdc make ThirdPartyUtil use Components instead of Services. r=kmag https://hg.mozilla.org/integration/autoland/rev/f6a2f878fa0f make History use Components instead of Services. r=kmag https://hg.mozilla.org/integration/autoland/rev/83cea9a71527 make HttpActivityDistributor use Components instead of Services. r=kmag,necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/18b51f552cec make UUIDGenerator use Components instead of Services. r=kmag https://hg.mozilla.org/integration/autoland/rev/6a5f3317cc4a make ServiceWorkerManager use Components instead of Services. r=kmag https://hg.mozilla.org/integration/autoland/rev/81accf94ee9f make PermissionManager use Components instead of Services. r=kmag https://hg.mozilla.org/integration/autoland/rev/832de017f827 make Directory use Components instead of Services. r=kmag https://hg.mozilla.org/integration/autoland/rev/b37b84e13f00 make IO use Components instead of Services. r=kmag https://hg.mozilla.org/integration/autoland/rev/3ad4d0b12a62 make StringBundle use Components instead of Services. r=kmag https://hg.mozilla.org/integration/autoland/rev/6b23a123adcb make CacheStorage use Components instead of Services. r=kmag,necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/2337db198699 make StreamTransport use Components instead of Services. r=kmag,necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/4814392b66bd make SocketTransport use Components instead of Services. r=kmag,necko-reviewers,valentin

Still have to do ObserverService.

Keywords: leave-open
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

As well as fixup the includes of every file this touches wrt services.h\components.h.
This is all the automated\trivial changes -- the next commit will do the hand-edits.

Depends on D105848

CookieCommons.h was relying on implicitly including ThirdPartyUtils from Services.h

Database had one remaining use of services that slipped past previous rounds.

Depends on D105849

Attachment #9204337 - Attachment description: Bug 1686616 - Bulk convert all uses of ObserverService to Components;Observer. r?kmag → Bug 1686616 - Bulk convert all uses of ObserverService to use Components. r?kmag

This is blocked on the above ObserverService change causing mysterious crashes. Changing all of those points seems to cause a fundamental change in how the ObserverService is created/destroyed in some subtle way that I wasn't able to isolate. I tried binary searching which usage sites were problematic but it seemed to be unstable / some combination of multiple sites?

At this point someone more experienced with the services system needs to finish this up, unfortunately.

Assignee: a.beingessner → nobody
See Also: → 1733756
Attachment #9204337 - Attachment is obsolete: true
Attachment #9204334 - Attachment is obsolete: true
Attachment #9204338 - Attachment is obsolete: true
See Also: → 1773085

It looks like a ton of patches landed in this bug, so let's just close it. I filed a new bug, bug 1773085, for the remaining work.

Assignee: nobody → a.beingessner
Status: REOPENED → RESOLVED
Closed: 4 years ago2 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: