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

Unified Diff: test/cctest/test-decls.cc

Issue 893993007: Protect against uninitialized lexical variables at top-level. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/ic/ic.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-decls.cc
diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc
index 781bf9ec858efce6d565a97d2b3b731a258ed5ac..5d487bb7da549aa165328558b13bcbad3d04f881 100644
--- a/test/cctest/test-decls.cc
+++ b/test/cctest/test-decls.cc
@@ -1145,3 +1145,21 @@ TEST(CrossScriptAssignmentToConst) {
context.Check("x", EXPECT_RESULT, Number::New(CcTest::isolate(), 1));
}
}
+
+
+TEST(Regress425510) {
+ i::FLAG_harmony_scoping = true;
+ i::FLAG_allow_natives_syntax = true;
+
+ HandleScope handle_scope(CcTest::isolate());
+
+ {
+ SimpleContext context;
+
+ context.Check("'use strict'; o; const o = 10", EXPECT_EXCEPTION);
+
+ for (int i = 0; i < 100; i++) {
+ context.Check("o.prototype", EXPECT_EXCEPTION);
+ }
+ }
+}
« no previous file with comments | « src/ic/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698