Closed Bug 697917 Opened 14 years ago Closed 14 years ago

Avoid atomizing the token for nsDOMTokenList containment tests

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

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.
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.
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla10
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
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: