Chromium Code Reviews| Index: src/compiler.cc |
| diff --git a/src/compiler.cc b/src/compiler.cc |
| index 9a5afe99dae54bb6a9afc2373bad51b165161acc..b2c56bc615e04240aee982a33304efcf2faf17ef 100644 |
| --- a/src/compiler.cc |
| +++ b/src/compiler.cc |
| @@ -1392,8 +1392,12 @@ MaybeHandle<JSArray> Compiler::CompileForLiveEdit(Handle<Script> script) { |
| bool Compiler::EnsureBytecode(CompilationInfo* info) { |
| DCHECK(ShouldUseIgnition(info)); |
| if (!info->shared_info()->HasBytecodeArray()) { |
| - DCHECK(!info->shared_info()->is_compiled()); |
| + Handle<Code> original_code(info->shared_info()->code()); |
| if (GetUnoptimizedCode(info).is_null()) return false; |
| + DCHECK(info->shared_info()->is_compiled()); |
| + if (original_code->kind() == Code::FUNCTION) { |
|
rmcilroy
2016/08/24 13:31:34
A comment might be good here.
Michael Starzinger
2016/08/24 13:42:35
Done.
|
| + info->shared_info()->ReplaceCode(*original_code); |
| + } |
| } |
| DCHECK(info->shared_info()->HasBytecodeArray()); |
| return true; |