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()); |