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

Unified Diff: src/d8.cc

Issue 2611643002: [modules] Add an IsModule flag to ScriptOriginOptions. (Closed)
Patch Set: Created 3 years, 12 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
« include/v8.h ('K') | « src/compiler.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 9c5dd0cd73ec7be83eecb9cf5242ead0845da11b..4f4f042702b4b7eaa1e6d49143d3b89152cade75 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -690,9 +690,10 @@ MaybeLocal<Module> Shell::FetchModuleTree(Local<Context> context,
printf("Error reading '%s'\n", file_name.c_str());
Shell::Exit(1);
}
- ScriptOrigin origin(
+ ScriptOrigin origin = ScriptOrigin::ModuleOrigin(
String::NewFromUtf8(isolate, file_name.c_str(), NewStringType::kNormal)
- .ToLocalChecked());
+ .ToLocalChecked(),
+ isolate);
ScriptCompiler::Source source(source_text, origin);
Local<Module> module;
if (!ScriptCompiler::CompileModule(isolate, &source).ToLocal(&module)) {
« include/v8.h ('K') | « src/compiler.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698