Note: There are a few cases of duplicates in user autocompletion which are being worked on.

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

RESOLVED FIXED in mozilla10

Status

()

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

People

(Reporter: bz, Assigned: bz)

Tracking

({perf})

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

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
As the summary says.
(Assignee)

Comment 1

6 years ago
Created 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.
Attachment #569610 - Flags: review?(peterv)
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

6 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

6 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

6 years ago
https://hg.mozilla.org/mozilla-central/rev/8f1b74f0b569
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.