Closed
Bug 1097694
Opened 10 years ago
Closed 9 years ago
js::HasOwnProperty sanity surgery
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: jorendorff, Assigned: jorendorff)
Details
Attachments
(1 file, 1 obsolete file)
13.04 KB,
patch
|
efaust
:
review+
|
Details | Diff | Splinter Review |
* Rename the clownshoes js::HasOwnProperty signature to js::NonProxyLookupOwnProperty, which is what it really is. * Change the sane js::HasOwnProperty signature to use the hasOwn handler when the argument is a proxy, as that's what it's there for. Gah.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8521428 -
Flags: review?(efaustbmo)
Assignee | ||
Comment 2•10 years ago
|
||
* Rename the clownshoes js::HasOwnProperty signature to js::NonProxyLookupOwnProperty, which is what it really is. * Change the sane js::HasOwnProperty signature to use the hasOwn handler when the argument is a proxy, as that's what it's there for. * Change the DirectProxyHandler::hasOwn implementation to use js::HasOwnProperty, so that when target is also a proxy, we end up calling its hasOwn handler. Similar changes in ScriptedDirectProxyHandler.cpp.
Attachment #8521935 -
Flags: review?(efaustbmo)
Assignee | ||
Updated•10 years ago
|
Attachment #8521428 -
Attachment is obsolete: true
Attachment #8521428 -
Flags: review?(efaustbmo)
Assignee | ||
Comment 3•10 years ago
|
||
The first version of the patch caused a bunch of breakage because structured cloning stopped working on WaiveXray proxies. After 30 minutes in GDB, I found myself looking at *obviously* wrong code in DirectProxyHandler::hasOwn. #clownshoes
Comment 4•10 years ago
|
||
Comment on attachment 8521935 [details] [diff] [review] js::HasOwnProperty sanity surgery Review of attachment 8521935 [details] [diff] [review]: ----------------------------------------------------------------- This makes good sense to me. Another solid improvement to the property handling. ::: js/src/proxy/DirectProxyHandler.cpp @@ -220,5 @@ > RootedObject target(cx, proxy->as<ProxyObject>().target()); > - Rooted<PropertyDescriptor> desc(cx); > - if (!JS_GetPropertyDescriptorById(cx, target, id, &desc)) > - return false; > - *bp = (desc.object() == target); This is an insidious idiom and I am more than happy to see it go. Own means own.
Attachment #8521935 -
Flags: review?(efaustbmo) → review-
Comment 5•10 years ago
|
||
Comment on attachment 8521935 [details] [diff] [review] js::HasOwnProperty sanity surgery Review of attachment 8521935 [details] [diff] [review]: ----------------------------------------------------------------- This makes good sense to me. Another solid improvement to the property handling. Clearly intended to + this. ::: js/src/proxy/DirectProxyHandler.cpp @@ -220,5 @@ > RootedObject target(cx, proxy->as<ProxyObject>().target()); > - Rooted<PropertyDescriptor> desc(cx); > - if (!JS_GetPropertyDescriptorById(cx, target, id, &desc)) > - return false; > - *bp = (desc.object() == target); This is an insidious idiom and I am more than happy to see it go. Own means own.
Attachment #8521935 -
Flags: review- → review+
Assignee | ||
Comment 6•10 years ago
|
||
Pretty: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=a8fb45cfc25c
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ff97ac763705
b2g build bustage https://treeherder.mozilla.org/ui/logviewer.html#?job_id=4173512&repo=mozilla-inbound https://hg.mozilla.org/integration/mozilla-inbound/rev/2ca8635fe240
Assignee | ||
Comment 9•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a897b65fd0e
Comment 10•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4a897b65fd0e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•