Index: src/value-serializer.cc |
diff --git a/src/value-serializer.cc b/src/value-serializer.cc |
index 0d6371dc78b20f881ea87d882af5052757c46b6c..19f8588044570318189f085ab1ec5b0d1be2ad0a 100644 |
--- a/src/value-serializer.cc |
+++ b/src/value-serializer.cc |
@@ -1569,11 +1569,16 @@ MaybeHandle<JSObject> ValueDeserializer::ReadWasmModule() { |
} |
// If that fails, recompile. |
- wasm::ErrorThrower thrower(isolate_, "ValueDeserializer::ReadWasmModule"); |
- return wasm::CreateModuleObjectFromBytes( |
- isolate_, wire_bytes.begin(), wire_bytes.end(), &thrower, |
- wasm::ModuleOrigin::kWasmOrigin, Handle<Script>::null(), |
- Vector<const byte>::empty()); |
+ MaybeHandle<JSObject> result; |
+ { |
+ wasm::ErrorThrower thrower(isolate_, "ValueDeserializer::ReadWasmModule"); |
+ result = wasm::CreateModuleObjectFromBytes( |
+ isolate_, wire_bytes.begin(), wire_bytes.end(), &thrower, |
+ wasm::ModuleOrigin::kWasmOrigin, Handle<Script>::null(), |
+ Vector<const byte>::empty()); |
+ } |
+ RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate_, JSObject); |
+ return result; |
} |
MaybeHandle<JSObject> ValueDeserializer::ReadHostObject() { |