-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 passed as vm context hides built-in properties. #6158
Labels
vm
Issues and PRs related to the vm subsystem.
Comments
I think the issue is because |
This should be fixed upstream in V8 5.2: https://codereview.chromium.org/1929853002. I will request a merge back to V8 5.0 in upstream. |
3 tasks
targos
added a commit
to targos/node
that referenced
this issue
May 26, 2016
A Proxy context should not hide built-in global objects. Ref: nodejs#6158 PR-URL: nodejs#6967 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this issue
May 30, 2016
Pick up the latest set of patch level updates from the V8 5.0 branch. v8/v8@5.0.71.47...5.0.71.52 Fixes: nodejs#6158 PR-URL: nodejs#6928 Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this issue
May 30, 2016
A Proxy context should not hide built-in global objects. Ref: nodejs#6158 PR-URL: nodejs#6967 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
rvagg
pushed a commit
that referenced
this issue
Jun 2, 2016
Pick up the latest set of patch level updates from the V8 5.0 branch. v8/v8@5.0.71.47...5.0.71.52 Fixes: #6158 PR-URL: #6928 Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
rvagg
pushed a commit
that referenced
this issue
Jun 2, 2016
A Proxy context should not hide built-in global objects. Ref: #6158 PR-URL: #6967 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proxy object is not correctly contextified by vm.createContext routine.
I've tried to create vm with traps on global context, so I made one based on Proxy object.
Unfortunately, code executed inside vm doesn't have any access to built-ins.
Passing required built-ins this way:
ctx = new Proxy({String:String}, {})
vm.runInNewContext("String", ctx)
seems to be (a bit dirty) workaround, but it doesn't resolve a problem at all...
vm.runInNewContext("String.prototype.f = function(){}; ''.f()", ctx)
... because passed String differs from used built-in by string literal, so this code raises an exception (''.f is undefined)
Tested on builds from branches node-vee-eight-4.9/5.0
Proxies doesn't work with older V8s and VMs, because of "not an object" bug.
The text was updated successfully, but these errors were encountered: