From 5c9abc52c03202fb9632aeb3a6b2c4684c3e9db0 Mon Sep 17 00:00:00 2001 From: Ross McIlroy Date: Mon, 25 Feb 2019 10:35:45 +0000 Subject: [PATCH] [Compiler] If bytecode is flushed during code deserialization, fall through to recompile. With stress bytecode flushing it's possible for the main SFI of a script to have it's bytecode flushed during deserialization of the script. If this happens, just fall-through to recompile the SFI. BUG=v8:8901,v8:8395 Change-Id: I786c1ca93167b76810481892ade525d14ff9168f Reviewed-on: https://chromium-review.googlesource.com/c/1485837 Reviewed-by: Mythri Alle Commit-Queue: Ross McIlroy Cr-Commit-Position: refs/heads/master@{#59831} --- src/compiler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler.cc b/src/compiler.cc index 31ce742ace..14ea815f8d 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -1847,7 +1847,8 @@ MaybeHandle Compiler::GetSharedFunctionInfoForScript( Handle inner_result; if (CodeSerializer::Deserialize(isolate, cached_data, source, origin_options) - .ToHandle(&inner_result)) { + .ToHandle(&inner_result) && + inner_result->is_compiled()) { // Promote to per-isolate compilation cache. is_compiled_scope = inner_result->is_compiled_scope(); DCHECK(is_compiled_scope.is_compiled());