Closed Bug 1158222 Opened 9 years ago Closed 9 years ago

Implement last-minute change to ES6 [[Set]]

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: jorendorff, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Assignee: nobody → evilpies
Attachment #8606971 - Flags: review?(jorendorff)
Comment on attachment 8606971 [details] [diff] [review]
Implement the new [[Set]] receiver restrictions

Review of attachment 8606971 [details] [diff] [review]:
-----------------------------------------------------------------

Great. r=me.

::: js/src/proxy/BaseProxyHandler.cpp
@@ +175,2 @@
>          unsigned attrs =
> +            !!existingDescriptor.object()

Is the !! necessary here?

::: js/src/tests/ecma_6/Proxy/proxy-no-receiver-overwrite.js
@@ +15,5 @@
> +        throw "not invoked";
> +    }
> +})
> +
> +// This will invoke [[Set]] on the target, with the proxy as receiver.

Great test!

::: js/src/vm/NativeObject.cpp
@@ +1980,4 @@
>          // The common case. The caller has necessarily done a property lookup
>          // on obj and passed us the answer as objHasOwn.
> +        // We also know that the property is a data property and writable
> +        // iff it exists.

Plain "if" is more plain-spoken and logically just as good as "iff" here.
Attachment #8606971 - Flags: review?(jorendorff) → review+
https://hg.mozilla.org/mozilla-central/rev/8a807d40c36f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.