New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy [[SetPrototypeOf]] improvement #329

Closed
raulsebastianmihaila opened this Issue Jan 27, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@raulsebastianmihaila

raulsebastianmihaila commented Jan 27, 2016

AFAICT, most of the proxy internal methods that are meant to change some state (preventExtensions, defineProperty, set and delete) check the state of the target only if the trap returns a truthy value. Wouldn't it be better for setPrototypeOf to behave the same?

By that I mean that in step 11 of [SetPrototypeOf] there should be a check like If booleanTrapResult is false, return false.

I think this would make it easier to reason about proxies.

@claudepache

This comment has been minimized.

Show comment
Hide comment
@claudepache

claudepache Jan 27, 2016

Contributor

Link to the spec section of the latest draft.

I think indeed that the current steps 9-12 should be run only if booleanTrapResult is true.

Contributor

claudepache commented Jan 27, 2016

Link to the spec section of the latest draft.

I think indeed that the current steps 9-12 should be run only if booleanTrapResult is true.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Feb 9, 2016

Member

This is fixed in master.

Member

bterlson commented Feb 9, 2016

This is fixed in master.

@bterlson bterlson closed this Feb 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment