Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upProxy [[SetPrototypeOf]] improvement #329
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
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.
|
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. |
claudepache
referenced this issue
Jan 27, 2016
Closed
Proxy [[SetPrototypeOf]]: avoid useless checks when the trap returns false #331
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
This is fixed in master. |
bterlson
closed this
Feb 9, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
raulsebastianmihaila commentedJan 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.