Closed
Bug 1129153
Opened 10 years ago
Closed 10 years ago
Change [[Delete]] to follow ES6
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: evilpie, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → evilpies
Assignee | ||
Comment 1•10 years ago
|
||
This was already pretty much okay, we were just waling the proto chain with LookupProperty.
Attachment #8558805 -
Flags: review?(jwalden+bmo)
Comment 2•10 years ago
|
||
Comment on attachment 8558805 [details] [diff] [review]
v1 - Implement ES6 [[Delete]]
Review of attachment 8558805 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jit-test/tests/proxy/delete-not-invoked-on-proto.js
@@ +1,2 @@
> +// Create Proxy that throws for everything.
> +var {proxy, revoke} = Proxy.revocable({}, {});
Instead of {} for handler, triggering default-er behavior (right?), seems better to use
var angryHandler = new Proxy({}, {
get(t, id) { throw new Error("angryHandler should not be queried (" + id + ")"); }
});
as handler. (Props to someone for putting that in a test I remember reviewing, tho I'm not sure if it was the one I just cribbed that from.)
::: js/src/vm/NativeObject.cpp
@@ +2232,5 @@
> +
> + // Step 4.
> + if (!shape) {
> + // If no property call the class's delProperty hook, passing succeeded
> + // as the result parameter. This always succeedes when there is no hook.
succeeds
@@ +2236,5 @@
> + // as the result parameter. This always succeedes when there is no hook.
> + return CallJSDeletePropertyOp(cx, obj->getClass()->delProperty, obj, id, succeeded);
> + }
> +
> + cx->runtime()->gc.poke();
wheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Attachment #8558805 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8558805 [details] [diff] [review]
v1 - Implement ES6 [[Delete]]
Review of attachment 8558805 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jit-test/tests/proxy/delete-not-invoked-on-proto.js
@@ +1,2 @@
> +// Create Proxy that throws for everything.
> +var {proxy, revoke} = Proxy.revocable({}, {});
Well the idea that a revoked proxy throws for every hook, so I don't need to do it manually.
Assignee | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox38:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•