Closed Bug 1325279 Opened 3 years ago Closed 3 years ago
Put the reaction queue in Custom
Element Data structure instead of using a map
+++ This bug was initially created as a follow-up of Bug #1309184 comment #22 +++ > + typedef nsTArray<nsAutoPtr<CustomElementReaction>> ReactionQueue; > + typedef nsClassHashtable<nsISupportsHashKey, ReactionQueue> > + ElementReactionQueueMap; > + > + ElementReactionQueueMap mElementReactionQueueMap; Elements have a structured called CustomElementData in the slots, you may be able put the reaction queue in that structure instead of using a map, but it will require a bit of refactoring to create the CustomElementData a bit earlier when we add elements to the reactions stack.
Per project discussion, this is a nice-to-have refactoring, not necessarily being in the project MVT, so removing dom-ce-m2 whiteboard.
Bug 1347446 makes accessing ElementReactionQueue in CustomElementRegistry becomes a bit non-trival (have to get it via DocGroup) and bug 1299363 part 2 patch has already refactored the creation time of CustomElementData, so I am going to handle this change in bug 1299363 (part 6 patch). Then we can just get reaction queue from Element.
I planed to handle this bug in bug 1299363. But other bugs are blocked by this change, so I move the patch back to this bug in order to let other bugs can move forward.
Attachment #8862258 - Attachment is obsolete: true
Comment on attachment 8866161 [details] [diff] [review] Patch, v3 Review of attachment 8866161 [details] [diff] [review]: ----------------------------------------------------------------- Bug 1347446 makes accessing ElementReactionQueue becomes a bit non-trival (have to get it via DocGroup). Since bug 1359346 already refactors the creation time of CustomElementData, ReactionQueue can also be put into CustomElementData, then we can just get ReactionQueue from Element. May I have your review, William? Thank you.
Attachment #8866161 - Flags: review?(wchen)
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/36f9b151741b Put the reaction queue in CustomElementData structure instead of using a map; r=wchen
You need to log in before you can comment on or make changes to this bug.