Index: src/wasm/wasm-js.cc |
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc |
index 743a0e19da67aaae9ddb3801abbdcba2f12a6b75..0a81a528895a5118947ea2d0fb5c53a3c4379027 100644 |
--- a/src/wasm/wasm-js.cc |
+++ b/src/wasm/wasm-js.cc |
@@ -189,7 +189,8 @@ void WebAssemblyCompile(const v8::FunctionCallbackInfo<v8::Value>& args) { |
auto bytes = GetFirstArgumentAsBytes(args, &thrower); |
if (!IsCompilationAllowed(i_isolate, &thrower, args[0], true)) { |
- resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ auto maybe = resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ CHECK(!maybe.IsNothing()); |
return; |
} |
DCHECK(!thrower.error()); |
@@ -337,7 +338,8 @@ void WebAssemblyInstantiate(const v8::FunctionCallbackInfo<v8::Value>& args) { |
thrower.TypeError( |
"Argument 0 must be provided and must be either a buffer source or a " |
"WebAssembly.Module object"); |
- resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ auto maybe = resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ CHECK(!maybe.IsNothing()); |
return; |
} |
@@ -345,18 +347,21 @@ void WebAssemblyInstantiate(const v8::FunctionCallbackInfo<v8::Value>& args) { |
if (!first_arg->IsJSObject()) { |
thrower.TypeError( |
"Argument 0 must be a buffer source or a WebAssembly.Module object"); |
- resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ auto maybe = resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ CHECK(!maybe.IsNothing()); |
return; |
} |
auto maybe_imports = GetSecondArgumentAsImports(args, &thrower); |
if (thrower.error()) { |
- resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ auto maybe = resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ CHECK(!maybe.IsNothing()); |
return; |
} |
if (!IsInstantiationAllowed(i_isolate, &thrower, args[0], maybe_imports, |
true)) { |
- resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ auto maybe = resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ CHECK(!maybe.IsNothing()); |
return; |
} |
i::Handle<i::JSPromise> promise = Utils::OpenHandle(*resolver->GetPromise()); |
@@ -369,7 +374,8 @@ void WebAssemblyInstantiate(const v8::FunctionCallbackInfo<v8::Value>& args) { |
// WebAssembly.instantiate(bytes, imports) -> {module, instance} |
auto bytes = GetFirstArgumentAsBytes(args, &thrower); |
if (thrower.error()) { |
- resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ auto maybe = resolver->Reject(context, Utils::ToLocal(thrower.Reify())); |
+ CHECK(!maybe.IsNothing()); |
return; |
} |
i::wasm::AsyncCompileAndInstantiate(i_isolate, promise, bytes, |