Closed Bug 1325279 Opened 8 years ago Closed 8 years ago

Put the reaction queue in CustomElementData structure instead of using a map

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jdai, Assigned: edgar)

References

Details

(Whiteboard: dom-ce-m2 )

Attachments

(1 file, 1 obsolete file)

+++ 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.
Whiteboard: dom-ce-m2
Per project discussion, this is a nice-to-have refactoring, not necessarily being in the project MVT, so removing dom-ce-m2 whiteboard.
Whiteboard: dom-ce-m2
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.
Assignee: jdai → echen
Blocks: 1315885
Blocks: 1299363
Depends on: 1359346
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.
Attached patch Patch, v2 (obsolete) — Splinter Review
Whiteboard: dom-ce-m2
Attached patch Patch, v3Splinter Review
Rebase.
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)
Attachment #8866161 - Flags: review?(wchen) → review+
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/36f9b151741b Put the reaction queue in CustomElementData structure instead of using a map; r=wchen
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: