Closed
Bug 1390068
Opened 8 years ago
Closed 8 years ago
Define Symbol.toPrimitive on NPObjectMember instead of using a getProperty hook
Categories
(Core Graveyard :: Plug-ins, enhancement)
Core Graveyard
Plug-ins
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(1 file, 1 obsolete file)
|
3.55 KB,
patch
|
evilpies
:
review+
|
Details | Diff | Splinter Review |
Like bug 1389949, but this one is much simpler: instead of using a getProperty hook to return a function for Symbol.toPrimitive, we should just define this property when we create the NPObjectMember object.
Note that we have tests that rely on this (test_propertyAndMethod.html) and they pass with this patch.
Attachment #8896910 -
Flags: review?(evilpies)
| Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8896910 -
Attachment is obsolete: true
Attachment #8896910 -
Flags: review?(evilpies)
Attachment #8896911 -
Flags: review?(evilpies)
Comment 2•8 years ago
|
||
Comment on attachment 8896911 [details] [diff] [review]
Patch
Review of attachment 8896911 [details] [diff] [review]:
-----------------------------------------------------------------
Sounds sensible, using a getProperty hook for this wasn't really necessary.
::: dom/plugins/base/nsJSNPRuntime.cpp
@@ +2202,5 @@
> + return false;
> +
> + JS::Rooted<JS::Value> val(cx, JS::ObjectValue(*JS_GetFunctionObject(fun)));
> +
> + if (!JS_DefinePropertyById(cx, memobj, toPrimitiveId, val, 0))
I think DefinePropertyById has an object overload.
Attachment #8896911 -
Flags: review?(evilpies) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/030afe238ba3
Define Symbol.toPrimitive property when creating NPObjectMember instead of using a getProperty hook. r=evilpie
Comment 4•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•