Open Bug 1686616 Opened 1 year ago Updated 4 months ago

Migrate all Services.py interfaces to components.conf

Categories

(Core :: XPCOM, task)

task

Tracking

()

REOPENED
87 Branch
Tracking Status
firefox87 --- affected

People

(Reporter: Gankra, Unassigned)

References

Details

(Keywords: leave-open)

Attachments

(17 files, 1 obsolete file)

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

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.

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
You need to log in before you can comment on or make changes to this bug.