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

Unified Diff: src/value-serializer.cc

Issue 2659483004: ValueSerializer: Promote scheduled exceptions from wasm::ErrorThrower. (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698