Commit 0b638f0a authored by jochen's avatar jochen Committed by Commit bot

Produce a code cache if the embedder asks for one

Even if there's already one in memory

BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1900483002

Cr-Commit-Position: refs/heads/master@{#35564}
parent 53253799
...@@ -1331,8 +1331,10 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript( ...@@ -1331,8 +1331,10 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
timer.Start(); timer.Start();
} }
if (!maybe_result.ToHandle(&result)) { if (!maybe_result.ToHandle(&result) ||
// No cache entry found. Compile the script. (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. // Create a script object describing the script to be compiled.
Handle<Script> script = isolate->factory()->NewScript(source); Handle<Script> script = isolate->factory()->NewScript(source);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment