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

Unified Diff: src/compiler.cc

Issue 875863002: Probe same-isolate compilation cache before deserializing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 266bd54c6104820e836e6f2ebc18a16d7099822a..4517b1f8704b19bab2ea2d492d75c5b26c8ace31 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1293,7 +1293,10 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
MaybeHandle<SharedFunctionInfo> maybe_result;
Handle<SharedFunctionInfo> result;
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 &&
!isolate->debug()->is_loaded()) {
HistogramTimerScope timer(isolate->counters()->compile_deserialize());
@@ -1303,10 +1306,6 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
return result;
}
// Deserializer failed. Fall through to compile.
- } else {
- maybe_result = compilation_cache->LookupScript(
- source, script_name, line_offset, column_offset,
- is_shared_cross_origin, context);
}
}
« 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