Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1048)

Unified Diff: src/v8natives.js

Issue 653603002: Try to fix cross-script global scope (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scopes.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 5ffff2ecacd9f789d475595aa506c3093d20bfe4..c1e66c6549cdac64caf1de4d22e2ba2b2e34587f 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -174,7 +174,7 @@ function GlobalEval(x) {
var global_proxy = %GlobalProxy(global);
- var f = %CompileString(x, false);
+ var f = %CompileString(x, global_proxy, false);
if (!IS_FUNCTION(f)) return f;
return %_CallFunction(global_proxy, f);
@@ -1834,7 +1834,7 @@ function FunctionConstructor(arg1) { // length == 1
var global_proxy = %GlobalProxy(global);
// Compile the string in the constructor and not a helper so that errors
// appear to come from here.
- var f = %CompileString(source, true);
+ var f = %CompileString(source, global_proxy, true);
if (!IS_FUNCTION(f)) return f;
f = %_CallFunction(global_proxy, f);
%FunctionMarkNameShouldPrintAsAnonymous(f);
« no previous file with comments | « src/scopes.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698