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

Unified Diff: src/v8natives.js

Issue 781953002: Allow eval in detached contexts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/runtime/runtime-object.cc ('k') | test/cctest/test-api.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 7fb317db7e9e2860ab4cd5c6e53da54d4a4c3de5..bad0154b0ba0ba5bb7425a38cdd9aafb82783de6 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -163,16 +163,6 @@ function GlobalParseFloat(string) {
function GlobalEval(x) {
if (!IS_STRING(x)) return x;
- // For consistency with JSC we require the global object passed to
- // eval to be the global object from which 'eval' originated. This
- // is not mandated by the spec.
- // We only throw if the global has been detached, since we need the
- // receiver as this-value for the call.
- if (!%IsAttachedGlobal(global)) {
- throw new $EvalError('The "this" value passed to eval must ' +
- 'be the global object from which eval originated');
- }
-
var global_proxy = %GlobalProxy(global);
var f = %CompileString(x, false, 0);
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698