Closed Bug 1347634 Opened 8 years ago Closed 8 years ago

GetCustomElementData should be non-virtual and inline

Categories

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

50 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Performance Impact none
Tracking Status
firefox55 --- fixed

People

(Reporter: smaug, Assigned: edgar)

References

Details

Attachments

(1 file, 1 obsolete file)

It is used in some very hot code paths.
Whiteboard: [qf-]
Attached patch Patch, v1 (obsolete) — Splinter Review
Assignee: nobody → echen
Comment on attachment 8847895 [details] [diff] [review]
Patch, v1

Review of attachment 8847895 [details] [diff] [review]:
-----------------------------------------------------------------

And SetCustomElementData don't need to be virtual, either.
Attachment #8847895 - Flags: review?(bugs)
Comment on attachment 8847895 [details] [diff] [review]
Patch, v1

+    nsDOMSlots *slots = GetExistingDOMSlots();
nit, nsDOMSlots* slots

It would be even nicer to move Get/SetCustomElementData to Element class, since looks like all the callers deal with Element already.

And then
+  /**
+   * Sets the custom element data, ownership of the
+   * callback data is taken by this content.
s/taken by this content/taken by this element/

With those, r+
Thanks!
Attachment #8847895 - Flags: review?(bugs) → review+
Address review comment #4,
- move Get/SetCustomElementData to Element
- Fix comment: s/taken by this content/taken by this element/
Attachment #8847895 - Attachment is obsolete: true
Attachment #8848392 - Flags: review+
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f7f08f950287
GetCustomElementData and SetCustomElementData don't need to be virtual; r=smaug
https://hg.mozilla.org/mozilla-central/rev/f7f08f950287
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Depends on: 1398401
No longer depends on: 1398401
Component: DOM → DOM: Core & HTML
Performance Impact: --- → -
Whiteboard: [qf-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: