Closed
Bug 1508352
Opened 6 years ago
Closed 2 years ago
Remove app-info component registration
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: mccr8, Unassigned)
References
(Blocks 1 open bug)
Details
In JS, Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime) can be replaced with Services.appinfo.
I think for C++, an entry would have to be added to xpcom/build/Services.py for it.
One tricky thing is that some tests use updateAppInfo from AppInfo.jsm. I'm not sure how to deal with that. Maybe the C++ implementation of AppInfo will have to be given a method to let you overload values.
Comment 1•6 years ago
|
||
For now, this will not remove the XPCOM component registration since Services.foo still rely on it, right?
Reporter | ||
Comment 2•6 years ago
|
||
Oh, right. I guess once things are centralized, maybe the Services thing could be written to load it via some other means.
Comment 3•6 years ago
|
||
I don't think it's going to be that easy. In order to replace each XPCOM based service with a C++ singleton getter function, you would need to replace the XPCOM registration code with a singleton getter function on the XPCOM service implementation side, similar to the patches landing for a lot of the blockers for bug 1477576.
That is, once Services.foo _can_ use a C++ singleton getter function, then we can start to rip off this band-aid sloooooowly. :-)
Reporter | ||
Comment 4•2 years ago
|
||
This was just some vague idea I had, so no need to leave it open.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•