Consider reserving space for one pointer in mMutationObservers

RESOLVED FIXED in Firefox 56

Status

()

RESOLVED FIXED
a year ago
24 days ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

(Blocks: 1 bug)

unspecified
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
This way setting an input value for example won't incur an allocation here when a range gets created for the selection, and we won't be growing the slot by too much.

We still have the static asserts in FragmentOrElement.cpp imposing a maximum size on our slots.
(Assignee)

Comment 1

a year ago
Created attachment 8891596 [details] [diff] [review]
Reserve space for one pointer in the mMutationObservers array on node slots

This helps avoid allocations for the first mutation observer (for example, Range)
created by a caller.
Attachment #8891596 - Flags: review?(bugs)
(Assignee)

Comment 2

a year ago
(The macros in nsTObserverArray.h are copied from similar macros adjacent to them, just changing the array type used in them.)

Updated

a year ago
Attachment #8891596 - Flags: review?(bugs) → review+

Comment 3

a year ago
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/559f7f92c891
Reserve space for one pointer in the mMutationObservers array on node slots; r=smaug
https://hg.mozilla.org/mozilla-central/rev/559f7f92c891
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Assignee: nobody → ehsan
You need to log in before you can comment on or make changes to this bug.