Skip to content

Commit

Permalink
[wasm] Avoid checking for scheduled_exceptions in the wasm deserializ…
Browse files Browse the repository at this point in the history
…ation

ValueDeserializer::ReadWasmModule does not call API functions, therefore
there can be no scheduled_exceptions, and therefore we do not have to
translate scheduled_exceptions to pending_exceptions. On the contrary,
there can be pending_exceptions, which causes the call to
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION to crash.

This CL fixes a crash in a layout test which was caused by another
CL (https://crrev.com/c/975547).

[email protected]
CC=​[email protected]

Change-Id: I3078a2a9a532b079b5a4ea604c2f3f777fa2e287
Reviewed-on: https://chromium-review.googlesource.com/1006794
Reviewed-by: Michael Starzinger <[email protected]>
Commit-Queue: Andreas Haas <[email protected]>
Cr-Commit-Position: refs/heads/master@{#52547}
  • Loading branch information
gahaas authored and Commit Bot committed Apr 11, 2018
1 parent 3e7b7ed commit e921be5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/value-serializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,6 @@ MaybeHandle<JSObject> ValueDeserializer::ReadWasmModule() {
result = isolate_->wasm_engine()->SyncCompile(
isolate_, &thrower, wasm::ModuleWireBytes(wire_bytes));
}
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate_, JSObject);
uint32_t id = next_id_++;
if (!result.is_null()) {
AddObjectWithID(id, result.ToHandleChecked());
Expand Down

0 comments on commit e921be5

Please sign in to comment.