Closed
Bug 873111
Opened 11 years ago
Closed 11 years ago
Move Note*Root methods out of nsCycleCollectionTraversalCallback into a new interface
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: mccr8, Assigned: mccr8)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
23.38 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
NoteXPCOMRoot, NoteJSRoot and NoteNativeRoot are only used during the very beginning of CC graph building, namely when we add XPConnect roots and purple buffer roots. Likewise, the other methods are only used later. We can statically enforce this phase separation by creating a new callback interface that contains only the Note*Root methods (and possibly the various flag-related things), then remove the Note*Root fromnsCycleCollectionTraversalCallback. Then just update the types and remove all of the useless Note*Root methods from the callback implementations that are not the CC itself.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → continuation
Assignee | ||
Comment 1•11 years ago
|
||
NoteWeakMap is another method that we can move over. One annoyance I'm not sure how to deal with is that both the RootingCallback and the TraversalCallback need a WantAllTraces() method, and then the graph builder inherits from both. I may take the cheesy approach and just use different field and method names for the two classes.
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #750791 -
Flags: review?(bugs)
Comment 3•11 years ago
|
||
Comment on attachment 750791 [details] [diff] [review] split the interface Could you use the normal coding style in nsCycleCollectionRootingCallback.h. Foo* aParamName as params. But nsCycleCollectionRootingCallback is odd. The ...Rooting... part of it. We're not rooting anything, but noting about roots. Maybe nsCycleCollectionRootTraversalCallback.
Attachment #750791 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 4•11 years ago
|
||
> We're not rooting anything, but noting about roots.
Yeah, I was just continuing the existing weird terminology. I'll try to think about a better name.
Assignee | ||
Comment 5•11 years ago
|
||
Maybe I'll go with nsCycleCollectionNoteRootCallback. That's a little shorter and a more literal description of what it does, though really it is just passing the buck.
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/286e34bb0bb8
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/286e34bb0bb8
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•