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

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

Issue 2251433002: [wasm] asm.js - Check stdlib.NaN is valid, prepare for the rest. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix 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
Index: src/runtime/runtime-compiler.cc
diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc
index 9fe5d9c1ef7cacb80c58b1072edb1eec23068829..9885cdeae2ec5c98e94e66cb1ff194b8202192cd 100644
--- a/src/runtime/runtime-compiler.cc
+++ b/src/runtime/runtime-compiler.cc
@@ -93,7 +93,9 @@ RUNTIME_FUNCTION(Runtime_InstantiateAsmJs) {
if (args[3]->IsJSArrayBuffer()) {
memory = args.at<i::JSArrayBuffer>(3);
}
- if (args[1]->IsJSObject() && function->shared()->HasAsmWasmData()) {
+ if (args[1]->IsJSObject() && function->shared()->HasAsmWasmData() &&
+ AsmJs::IsStdlibValid(isolate, handle(function->shared()->asm_wasm_data()),
+ args.at<JSObject>(1))) {
titzer 2016/08/19 10:00:28 Does that need to be args.at<JSReceiver>?
bradn 2016/08/19 17:29:08 Done.
MaybeHandle<Object> result;
result = AsmJs::InstantiateAsmWasm(
isolate, handle(function->shared()->asm_wasm_data()), memory, foreign);
« src/asmjs/asm-js.cc ('K') | « src/asmjs/asm-typer.cc ('k') | src/wasm/wasm-js.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698