The default bug view has changed. See this FAQ.

Avoid atomizing the token for nsDOMTokenList containment tests

RESOLVED FIXED in mozilla10

Status

()

Core
DOM
P2
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

unspecified
mozilla10
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We can easily do them on the string itself, and in the common case (few classes) the atomization is more expensive than just comparing strings.
Created attachment 570156 [details] [diff] [review]
Avoid atomizing the token for nsDOMTokenList containment tests.
Attachment #570156 - Flags: review?(Olli.Pettay)
Comment on attachment 570156 [details] [diff] [review]
Avoid atomizing the token for nsDOMTokenList containment tests.

Looks like nsTArray documentation is a bit wrong
http://mxr.mozilla.org/mozilla-central/source/xpcom/glue/nsTArray.h#410
Comparator::Equals parameters both have elem_type, but the latter one
could be actually something else like in this patch.
Attachment #570156 - Flags: review?(Olli.Pettay) → review+
Good catch.  I'll fix the docs.
http://hg.mozilla.org/integration/mozilla-inbound/rev/0371519c061e
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla10
https://hg.mozilla.org/mozilla-central/rev/0371519c061e
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.