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

Unified Diff: src/compiler.cc

Issue 1900483002: Produce a code cache if the embedder asks for one (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index b36d2663ac0545ee89e5f814d136aa3fa0df3501..b40c153684eee91ea2215e4efc8420fe71870aa0 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1331,8 +1331,10 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
timer.Start();
}
- if (!maybe_result.ToHandle(&result)) {
- // No cache entry found. Compile the script.
+ if (!maybe_result.ToHandle(&result) ||
+ (FLAG_serialize_toplevel &&
+ compile_options == ScriptCompiler::kProduceCodeCache)) {
+ // No cache entry found, or embedder wants a code cache. Compile the script.
// Create a script object describing the script to be compiled.
Handle<Script> script = isolate->factory()->NewScript(source);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698