Index: test/common/wasm/wasm-module-runner.cc |
diff --git a/test/common/wasm/wasm-module-runner.cc b/test/common/wasm/wasm-module-runner.cc |
index 4a18f1c42458fb010befbb227584357e8a04b50e..7bbacc77c12e7ef99433fccb4122bcae3b44f47f 100644 |
--- a/test/common/wasm/wasm-module-runner.cc |
+++ b/test/common/wasm/wasm-module-runner.cc |
@@ -66,10 +66,14 @@ const Handle<JSObject> InstantiateModuleForTesting(Isolate* isolate, |
isolate, module->module_start, module->module_end, thrower, |
ModuleOrigin::kWasmOrigin); |
if (module_object.is_null()) return Handle<JSObject>::null(); |
- return WasmModule::Instantiate(isolate, module_object.ToHandleChecked(), |
- Handle<JSReceiver>::null(), |
- Handle<JSArrayBuffer>::null()) |
- .ToHandleChecked(); |
+ MaybeHandle<JSObject> maybe_instance = WasmModule::Instantiate( |
+ isolate, module_object.ToHandleChecked(), Handle<JSReceiver>::null(), |
+ Handle<JSArrayBuffer>::null()); |
+ Handle<JSObject> instance; |
+ if (!maybe_instance.ToHandle(&instance)) { |
+ return Handle<JSObject>::null(); |
+ } |
+ return instance; |
} |
int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start, |