Closed Bug 697351 Opened 14 years ago Closed 14 years ago

Implement a has() trap on nodelist that doesn't involve dealing with property descriptors

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Keywords: perf)

Attachments

(1 file)

As the summary says.
Comment on attachment 569610 [details] [diff] [review] Implement has() on the nodelist proxy handler so that we don't have to do the property descriptor song and dance for it. Review of attachment 569610 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/xpconnect/src/dombindings.cpp @@ +821,5 @@ > + JSBool protoHasProp; > + bool ok = JS_HasPropertyById(cx, proto, id, &protoHasProp); > + if (ok) > + *bp = protoHasProp; > + return ok; Isn't it fine to do return JS_HasPropertyById(cx, proto, id, bp); ?
Attachment #569610 - Flags: review?(peterv) → review+
> Isn't it fine to do Sadly, no. That's what I wrote first, but bp is a bool* and JS_HasPropertyById has JSBool* as its last argument, and the two are not compatible.
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: