Closed
Bug 1217047
Opened 9 years ago
Closed 9 years ago
make nsComponentManagerImpl::IsContractIDRegistered lie less
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: froydnj, Assigned: froydnj)
References
Details
Attachments
(1 file)
(deleted),
patch
|
benjamin
:
review+
yury
:
feedback+
lizzard
:
approval-mozilla-aurora+
lizzard
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Yury and Michael were running into some issues with the component manager. The following sequence of steps:
* RegisterFactory $CID, $CONTRACT_ID
* UnregisterFactory $CID
* IsContractIDRegistered $CONTRACT_ID
can return true, which seems nonsensical. It makes a certain amount of sense, since UnregisterFactory doesn't know what contract ID corresponds to $CID. But we can do better. I know I've been bitten by this before and wasted a good amount of time figuring out what was going on.
I think we can do better, and a try push with an experimental patch seems to not break anything horribly. I'll toss that up in a second.
Assignee | ||
Comment 1•9 years ago
|
||
We can have a valid nsFactoryEntry in the following cases:
* We registered a known module;
* We registered a factory (mModule will be null in this case);
* We created a service via the factory.
So one of these members must be valid if we still have a entry in the
contract ID table that actually does interesting things.
Attachment #8676950 -
Flags: review?(benjamin)
Attachment #8676950 -
Flags: feedback?(ydelendik)
Comment 2•9 years ago
|
||
Comment on attachment 8676950 [details] [diff] [review]
try harder in IsContractIDRegistered to return a reasonable answer
Worth checking whether this fixes bug 1193155.
Comment 3•9 years ago
|
||
Comment on attachment 8676950 [details] [diff] [review]
try harder in IsContractIDRegistered to return a reasonable answer
Review of attachment 8676950 [details] [diff] [review]:
-----------------------------------------------------------------
Fixed bug 1193155 for me. (As well as bug 1193088, but it hard to tell if this or bug 1179262 fixed it)
Attachment #8676950 -
Flags: feedback?(ydelendik) → feedback+
Comment 4•9 years ago
|
||
Comment on attachment 8676950 [details] [diff] [review]
try harder in IsContractIDRegistered to return a reasonable answer
We should remove this API, but as long as we've got it it might as well do something useful.
Attachment #8676950 -
Flags: review?(benjamin) → review+
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nfroyd
Comment 6•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8676950 [details] [diff] [review]
try harder in IsContractIDRegistered to return a reasonable answer
Approval Request Comment
[Feature/regressing bug #]: bug 1179262
[User impact if declined]: can't toggle PDF.js on and off without restart (see bug 1193155)
[Describe test coverage new/current, TreeHerder]: We have a few tests in-tree that exercise code around here, though not the specific additions that were made.
[Risks and why]: Low risk.
[String/UUID change made/needed]: None.
Attachment #8676950 -
Flags: approval-mozilla-beta?
Attachment #8676950 -
Flags: approval-mozilla-aurora?
Comment on attachment 8676950 [details] [diff] [review]
try harder in IsContractIDRegistered to return a reasonable answer
Restarting is annoying for users; let's uplift this small fix to aurora and beta.
Attachment #8676950 -
Flags: approval-mozilla-beta?
Attachment #8676950 -
Flags: approval-mozilla-beta+
Attachment #8676950 -
Flags: approval-mozilla-aurora?
Attachment #8676950 -
Flags: approval-mozilla-aurora+
Marking as affected for 42+ since this seems to have been a problem since at least 40.
Comment 10•9 years ago
|
||
bugherder uplift |
Comment 11•9 years ago
|
||
bugherder uplift |
Comment 12•9 years ago
|
||
bugherder uplift |
status-b2g-v2.5:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•