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

Unified Diff: src/wasm/wasm-js.cc

Issue 2640453003: [wasm] Fix and tighten memory validation (Closed)
Patch Set: Comments Created 3 years, 11 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/wasm/function-body-decoder.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-js.cc
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc
index 21bcc0dc9d204e6ff12bec230099ed1f04864cea..7d16174608996da86567ff05d3c2d0b2ffc104ac 100644
--- a/src/wasm/wasm-js.cc
+++ b/src/wasm/wasm-js.cc
@@ -308,7 +308,10 @@ void WebAssemblyInstance(const v8::FunctionCallbackInfo<v8::Value>& args) {
MaybeLocal<Value> instance =
InstantiateModuleImpl(i_isolate, i_module_obj, args, &thrower);
- if (instance.IsEmpty()) return;
+ if (instance.IsEmpty()) {
+ DCHECK(thrower.error());
+ return;
+ }
v8::ReturnValue<v8::Value> return_value = args.GetReturnValue();
return_value.Set(instance.ToLocalChecked());
« no previous file with comments | « src/wasm/function-body-decoder.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698