Closed
Bug 104168
Opened 23 years ago
Closed 23 years ago
xpcom-autoregistration notification never fires
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.6
People
(Reporter: rginda, Assigned: dougt)
Details
(Whiteboard: ready to go)
Attachments
(1 file, 2 obsolete files)
1.96 KB,
patch
|
dougt
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
I need to register the js debugger as an observer of the xpcom-autoregistration topic so that I can start keeping track of scripts right away. The problem is twofold. First, the component manager only enters the notification code if it fails to create the notifier service (doh!), and second, the notification list comes from a table built at runtime. We havn't provided any hooks proir to this point in the app, so there is no way for a component to add itself to the list. The upcoming patch fixes what I assume was a NS_FAILED vs NS_SUCCEDED mixup, and uses the nsAppStartNotifier (which is poorly named, it's actually a generic "enumerate some category containing nsIObservers, and tell them something" component) to take care of the notifications. This allows clients to register as an "xpcom-autoregistration" observer via the category manager. This does introduce an asymmetrical relationship between the "xpcom-autoregistration" topic, which respects categories, and "xpcom-shutdown " which still uses a notify list built at runtime... but don't let that bother you.
Reporter | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
hey, your lucky it fires at all! :-) :-) I do not like the patch. It creates a depend on embedding. I will take a look at this more tomorrow. been up since 4am and I missed a meal or two. damn coworker bought 200 bucks worth of candy ;-)
Reporter | ||
Comment 3•23 years ago
|
||
Actually, the point of this bug is that it *doesn't* fire at all, but I'll let it slip because you're tired ;) I was afraid someone would complain about the new REQUIRES, so I am prepared to offer a solution. How's about we rename nsAppStartNotifier to nsCategoryNotifier, and move it to xpcom/components. No one has a new depend, and the component gets the name it deserves.
Reporter | ||
Comment 4•23 years ago
|
||
Here comes a new patch, fire at will.
Reporter | ||
Comment 5•23 years ago
|
||
Reporter | ||
Comment 6•23 years ago
|
||
Alternatley, we could add a notifyCategory to the category manager, and avoid the new component and interface. That is if the interface isn't frozen (I don't see any comment about it.)
Assignee | ||
Comment 7•23 years ago
|
||
robert, the component manager is going to get an overhaul in the next week or two. I would like to roll this into the new interfaces. I will keep you posted.
Reporter | ||
Comment 8•23 years ago
|
||
Can I get a status check on this one? The debugger code would make use of this patch has just been checked in, and this is now the only bug blocking the ability to debug javascript components that have changed since the last run.
Reporter | ||
Updated•23 years ago
|
Attachment #53047 -
Attachment is obsolete: true
Reporter | ||
Updated•23 years ago
|
Attachment #53184 -
Attachment is obsolete: true
Reporter | ||
Comment 9•23 years ago
|
||
Reporter | ||
Comment 10•23 years ago
|
||
thanks to dougt for pointing this out. The latest patch is *much* simpler, and does the same thing. I'll file a seperate bug to remove nsAppStartupNotifier.
Assignee | ||
Comment 11•23 years ago
|
||
Comment on attachment 55773 [details] [diff] [review] NS_CreateServicesFromCategory, who knew? looks fine. We should eventually rename this utility function.
Attachment #55773 -
Flags: review+
Comment 12•23 years ago
|
||
Comment on attachment 55773 [details] [diff] [review] NS_CreateServicesFromCategory, who knew? Yeah, the NS_CreateServicesFromCategory name is slightly off, isn't it? /be
Attachment #55773 -
Flags: superreview+
Assignee | ||
Updated•23 years ago
|
Whiteboard: ready to go
Target Milestone: --- → mozilla0.9.6
Reporter | ||
Comment 13•23 years ago
|
||
I checked this in a few days ago, forgot to mark as such.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•