Skip to content

Conversation

@tcare
Copy link
Contributor

@tcare tcare commented Dec 16, 2017

Fixes OS: 14291082

Setting proto inside an eval inside a with takes us down a weird path. Usually we would have unwrapped the WithScopeObject automatically by using SetProperty or similar, but proto is special cased (along with some other things like HostDispatch) and will directly fetch the setter function and call it, bypassing the WithScopeObject:: methods (although still keeping the @@unscopables check.)

Fix is to unwrap the object after the @@unscopables object check has finished when getting the proto setter. I tried several other paths but they end up going through the WithScopeObject shims.

@tcare
Copy link
Contributor Author

tcare commented Dec 16, 2017

Also added some docs and a more verbose failfast in WithScopeObject.

@tcare tcare requested a review from pleath December 16, 2017 01:47
Copy link
Contributor

@akroshg akroshg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@tcare tcare force-pushed the withproto branch 2 times, most recently from 3fea783 to 7215a5d Compare January 19, 2018 01:40
@tcare
Copy link
Contributor Author

tcare commented Jan 19, 2018

Fixed a DebuggerCommon case that doesn't run in VSO.

@tcare
Copy link
Contributor Author

tcare commented Jan 25, 2018

@pleath ping

1 similar comment
@tcare
Copy link
Contributor Author

tcare commented Jan 29, 2018

@pleath ping

tcare added 2 commits January 30, 2018 15:38
Fixes OS: 14291082

Setting __proto__ inside an eval inside a with takes us down a weird path. Usually we would have unwrapped the WithScopeObject automatically by using SetProperty or similar, but __proto__ is special cased (along with some other things like HostDispatch) and will directly fetch the setter function and call it, bypassing the WithScopeObject:: methods (although still keeping the @@unscopables check.)

Fix is to unwrap the object after the @@unscopables object check has finished when getting the __proto__ setter. I tried several other paths but they end up going through the WithScopeObject shims.
@chakrabot chakrabot merged commit 3ddaa16 into chakra-core:release/1.8 Jan 31, 2018
chakrabot pushed a commit that referenced this pull request Jan 31, 2018
…_proto__ stores

Merge pull request #4431 from tcare:withproto

Fixes OS: 14291082

Setting __proto__ inside an eval inside a with takes us down a weird path. Usually we would have unwrapped the WithScopeObject automatically by using SetProperty or similar, but __proto__ is special cased (along with some other things like HostDispatch) and will directly fetch the setter function and call it, bypassing the WithScopeObject:: methods (although still keeping the @@unscopables check.)

Fix is to unwrap the object after the @@unscopables object check has finished when getting the __proto__ setter. I tried several other paths but they end up going through the WithScopeObject shims.
chakrabot pushed a commit that referenced this pull request Jan 31, 2018
…r scoped __proto__ stores

Merge pull request #4431 from tcare:withproto

Fixes OS: 14291082

Setting __proto__ inside an eval inside a with takes us down a weird path. Usually we would have unwrapped the WithScopeObject automatically by using SetProperty or similar, but __proto__ is special cased (along with some other things like HostDispatch) and will directly fetch the setter function and call it, bypassing the WithScopeObject:: methods (although still keeping the @@unscopables check.)

Fix is to unwrap the object after the @@unscopables object check has finished when getting the __proto__ setter. I tried several other paths but they end up going through the WithScopeObject shims.
chakrabot pushed a commit that referenced this pull request Jan 31, 2018
… unwrapped for scoped __proto__ stores

Merge pull request #4431 from tcare:withproto

Fixes OS: 14291082

Setting __proto__ inside an eval inside a with takes us down a weird path. Usually we would have unwrapped the WithScopeObject automatically by using SetProperty or similar, but __proto__ is special cased (along with some other things like HostDispatch) and will directly fetch the setter function and call it, bypassing the WithScopeObject:: methods (although still keeping the @@unscopables check.)

Fix is to unwrap the object after the @@unscopables object check has finished when getting the __proto__ setter. I tried several other paths but they end up going through the WithScopeObject shims.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants