Commit a699645b authored by yangguo's avatar yangguo Committed by Commit bot

Probe same-isolate compilation cache before deserializing.

R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26266}
parent 7e25cce0
...@@ -1293,7 +1293,10 @@ Handle<SharedFunctionInfo> Compiler::CompileScript( ...@@ -1293,7 +1293,10 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
MaybeHandle<SharedFunctionInfo> maybe_result; MaybeHandle<SharedFunctionInfo> maybe_result;
Handle<SharedFunctionInfo> result; Handle<SharedFunctionInfo> result;
if (extension == NULL) { if (extension == NULL) {
if (FLAG_serialize_toplevel && maybe_result = compilation_cache->LookupScript(
source, script_name, line_offset, column_offset, is_shared_cross_origin,
context);
if (maybe_result.is_null() && FLAG_serialize_toplevel &&
compile_options == ScriptCompiler::kConsumeCodeCache && compile_options == ScriptCompiler::kConsumeCodeCache &&
!isolate->debug()->is_loaded()) { !isolate->debug()->is_loaded()) {
HistogramTimerScope timer(isolate->counters()->compile_deserialize()); HistogramTimerScope timer(isolate->counters()->compile_deserialize());
...@@ -1303,10 +1306,6 @@ Handle<SharedFunctionInfo> Compiler::CompileScript( ...@@ -1303,10 +1306,6 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
return result; return result;
} }
// Deserializer failed. Fall through to compile. // Deserializer failed. Fall through to compile.
} else {
maybe_result = compilation_cache->LookupScript(
source, script_name, line_offset, column_offset,
is_shared_cross_origin, context);
} }
} }
......
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