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

Unified Diff: test/mjsunit/strong/declaration-after-use.js

Issue 1059273004: [strong] Implement static restrictions on direct eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cr feedback Created 5 years, 8 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
Index: test/mjsunit/strong/declaration-after-use.js
diff --git a/test/mjsunit/strong/declaration-after-use.js b/test/mjsunit/strong/declaration-after-use.js
index aa5ff672838a7717b18643f5655bc58df682adb5..3f5039249bad827c4ac2405892957b6aeee9e9cd 100644
--- a/test/mjsunit/strong/declaration-after-use.js
+++ b/test/mjsunit/strong/declaration-after-use.js
@@ -55,12 +55,6 @@ function assertThrowsHelper(code) {
" function f() { if (false) { x; } } var x; f(); \n" +
"})()");
- // Errors are also detected when the declaration and the use are in the same
- // eval scope.
- assertThrows("'use strong'; eval('if (false) { x; let x = 0;}')",
- ReferenceError);
- assertDoesNotThrow("'use strict'; eval('if (false) { x; let x = 0; }')");
-
// Use occurring in the initializer of the declaration:
assertThrowsHelper("let x = x + 1;");
assertThrowsHelper("let x = x;");
@@ -215,14 +209,6 @@ function assertThrowsHelper(code) {
var1, var2a, var2b, var2c;
}
- (function eval1() {
- let var7 = 0; // Declaration position will be something large.
- // But use position will be something small, however, this is not an error,
- // since the use is inside an eval scope.
- eval("var7;");
- })();
-
-
class C1 { constructor() { C1; } }; new C1();
let C2 = class C3 { constructor() { C3; } }; new C2();

Powered by Google App Engine
This is Rietveld 408576698