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

Unified Diff: src/d8.cc

Issue 2008743002: Remove broken source/code caching support for Modules in d8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added DCHECK Created 4 years, 7 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 | « no previous file | test/test262/test262.status » ('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 3b7863e543ef53ecb23e61a1a5fdd89714c53d67..7c955dacb929e682c21797f06c45cabc78e9bc96 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -338,7 +338,9 @@ MaybeLocal<Script> Shell::CompileString(
ScriptCompiler::CompileOptions compile_options, SourceType source_type) {
Local<Context> context(isolate->GetCurrentContext());
ScriptOrigin origin(name);
- if (compile_options == ScriptCompiler::kNoCompileOptions) {
+ // TODO(adamk): Make use of compile options for Modules.
+ if (compile_options == ScriptCompiler::kNoCompileOptions ||
+ source_type == MODULE) {
ScriptCompiler::Source script_source(source, origin);
return source_type == SCRIPT
? ScriptCompiler::Compile(context, &script_source,
@@ -358,11 +360,9 @@ MaybeLocal<Script> Shell::CompileString(
DCHECK(false); // A new compile option?
}
if (data == NULL) compile_options = ScriptCompiler::kNoCompileOptions;
+ DCHECK_EQ(SCRIPT, source_type);
MaybeLocal<Script> result =
- source_type == SCRIPT
- ? ScriptCompiler::Compile(context, &cached_source, compile_options)
- : ScriptCompiler::CompileModule(context, &cached_source,
- compile_options);
+ ScriptCompiler::Compile(context, &cached_source, compile_options);
CHECK(data == NULL || !data->rejected);
return result;
}
« no previous file with comments | « no previous file | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698