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)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: perf)
Attachments
(1 file)
As the summary says.
![]() |
Assignee | |
Comment 1•14 years ago
|
||
Attachment #569610 -
Flags: review?(peterv)
Comment 2•14 years ago
|
||
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+
![]() |
Assignee | |
Comment 3•14 years ago
|
||
> 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.
![]() |
Assignee | |
Comment 4•14 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/2fef1412e0e8
Thanks for the fast review!
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla10
Comment 5•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•