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

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: 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 9466ab7d3a727c2fe12d70ac977df0b0cac57f35..46b52baa5c70b1f1cc2c9211cdf9d69538cb40b5 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,
@@ -359,10 +361,7 @@ MaybeLocal<Script> Shell::CompileString(
}
if (data == NULL) compile_options = ScriptCompiler::kNoCompileOptions;
MaybeLocal<Script> result =
- source_type == SCRIPT
Dan Ehrenberg 2016/05/27 09:51:18 Add a check here that source_type == SCRIPT?
adamk 2016/05/27 18:53:07 Done.
- ? 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