Index: src/runtime/runtime-compiler.cc |
diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc |
index 862fefcd5045ad3fbc7a5dcd85c2b032be34387a..574beb88f3bd8f214280fa8c79d1ba531fd8fec0 100644 |
--- a/src/runtime/runtime-compiler.cc |
+++ b/src/runtime/runtime-compiler.cc |
@@ -101,8 +101,15 @@ RUNTIME_FUNCTION(Runtime_InstantiateAsmJs) { |
return *result.ToHandleChecked(); |
} |
} |
- // Remove wasm data and return a smi 0 to indicate failure. |
+ // Remove wasm data, mark as broken for asm->wasm, |
+ // replace code with CompileLazy, and return a smi 0 to indicate failure. |
function->shared()->ClearAsmWasmData(); |
+ function->shared()->set_is_asm_wasm_broken(true); |
+ DCHECK(function->code() == |
+ isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)); |
+ function->ReplaceCode(isolate->builtins()->builtin(Builtins::kCompileLazy)); |
+ function->shared()->ReplaceCode( |
Michael Starzinger
2016/08/12 09:21:55
Replacing the code on the SharedFunctionInfo is da
bradn
2016/08/12 18:50:02
Done.
|
+ isolate->builtins()->builtin(Builtins::kCompileLazy)); |
return Smi::FromInt(0); |
} |