Skip to content

Instantly share code, notes, and snippets.

@jugglinmike
Created February 24, 2016 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jugglinmike/b595db3ece6103bdbe08 to your computer and use it in GitHub Desktop.
Save jugglinmike/b595db3ece6103bdbe08 to your computer and use it in GitHub Desktop.
New test
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 8fa445d..39e6c2b 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -5946,6 +5946,31 @@ TEST(ModuleAwaitReserved) {
}
+TEST(Mike) {
+ i::FLAG_harmony_modules = true;
+ i::FLAG_min_preparse_length = 0;
+ i::Isolate* isolate = CcTest::i_isolate();
+ i::Factory* factory = isolate->factory();
+
+ v8::HandleScope handles(CcTest::isolate());
+ v8::Local<v8::Context> context = v8::Context::New(CcTest::isolate());
+ v8::Context::Scope context_scope(context);
+
+ isolate->stack_guard()->SetStackLimit(i::GetCurrentStackPosition() -
+ 128 * 1024);
+
+ i::Handle<i::String> source =
+ factory->NewStringFromAsciiChecked("function f() { var await = 0; }");
+
+ i::Handle<i::Script> script = factory->NewScript(source);
+ i::Zone zone;
+ i::ParseInfo info(&zone, script);
+ i::Parser parser(&info);
+ info.set_module();
+ CHECK(!parser.Parse(&info));
+}
+
+
TEST(ModuleAwaitPermitted) {
i::FLAG_harmony_modules = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment