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

Unified Diff: src/runtime/runtime-compiler.cc

Issue 2229723002: [wasm] Support validation of asm.js modules with != 3 args. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips and more Created 4 years, 4 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 | « src/runtime/runtime.h ('k') | src/runtime/runtime-test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-compiler.cc
diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc
index 862fefcd5045ad3fbc7a5dcd85c2b032be34387a..d75ecdd3c1c26ff80dbc3b6ae7854586a1b8b25b 100644
--- a/src/runtime/runtime-compiler.cc
+++ b/src/runtime/runtime-compiler.cc
@@ -101,8 +101,18 @@ 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));
+ if (function->shared()->code() ==
+ isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)) {
+ function->shared()->ReplaceCode(
+ isolate->builtins()->builtin(Builtins::kCompileLazy));
+ }
return Smi::FromInt(0);
}
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698