Skip to content

Commit 64831db

Browse files
thibaudmichaudguybedford
authored andcommitted
deps: V8: backport 323942700cfe
Original commit message: [wasm][exnref] Accept exnref subtypes for throw_ref Only accepting a strict exnref type was incorrect in two cases: - the stack-polymorphic case, with the bottom type - a noexn param [email protected] Fixed: 332931390 Change-Id: I80c96a7026f2469e6a3ce54344c2d5e617b78be7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5904414 Reviewed-by: Jakob Kummerow <[email protected]> Commit-Queue: Thibaud Michaud <[email protected]> Cr-Commit-Position: refs/heads/main@{#96387} Refs: v8/v8@323942700cfe
1 parent e2629b9 commit 64831db

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

deps/v8/src/wasm/function-body-decoder-impl.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3306,14 +3306,7 @@ class WasmFullDecoder : public WasmDecoder<ValidationTag, decoding_mode> {
33063306

33073307
DECODE(ThrowRef) {
33083308
this->detected_->Add(kFeature_exnref);
3309-
Value value = Pop();
3310-
if (!VALIDATE(
3311-
(value.type.kind() == kRef || value.type.kind() == kRefNull) &&
3312-
value.type.heap_type() == HeapType::kExn)) {
3313-
this->DecodeError("invalid type for throw_ref: expected exnref, found %s",
3314-
value.type.name().c_str());
3315-
return 0;
3316-
}
3309+
Value value = Pop(kWasmExnRef);
33173310
CALL_INTERFACE_IF_OK_AND_REACHABLE(ThrowRef, &value);
33183311
MarkMightThrow();
33193312
EndControl();

0 commit comments

Comments
 (0)