diff --git a/common.gypi b/common.gypi index 19e3cb8b101..7bf76ad7048 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.51', + 'v8_embedder_string': '-node.52', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/wasm/function-body-decoder-impl.h b/deps/v8/src/wasm/function-body-decoder-impl.h index 5df75d84d13..290660104a5 100644 --- a/deps/v8/src/wasm/function-body-decoder-impl.h +++ b/deps/v8/src/wasm/function-body-decoder-impl.h @@ -3280,7 +3280,7 @@ class WasmFullDecoder : public WasmDecoder { } if (catch_case.kind == kCatchRef || catch_case.kind == kCatchAllRef) { stack_.EnsureMoreCapacity(1, this->zone_); - Push(kWasmExnRef); + Push(ValueType::Ref(HeapType::kExn)); push_count += 1; } Control* target = control_at(catch_case.br_imm.depth); @@ -3506,7 +3506,7 @@ class WasmFullDecoder : public WasmDecoder { } if (catch_case.kind == kCatchRef || catch_case.kind == kCatchAllRef) { stack_.EnsureMoreCapacity(1, this->zone_); - Push(kWasmExnRef); + Push(ValueType::Ref(HeapType::kExn)); push_count += 1; } base::Vector values( diff --git a/deps/v8/src/wasm/graph-builder-interface.cc b/deps/v8/src/wasm/graph-builder-interface.cc index 458d8d859c2..96a9acb3419 100644 --- a/deps/v8/src/wasm/graph-builder-interface.cc +++ b/deps/v8/src/wasm/graph-builder-interface.cc @@ -1406,7 +1406,7 @@ class WasmGraphBuildingInterface { if (catch_case.kind == kCatchAll || catch_case.kind == kCatchAllRef) { if (catch_case.kind == kCatchAllRef) { - DCHECK_EQ(values[0].type, kWasmExnRef); + DCHECK_EQ(values[0].type, ValueType::Ref(HeapType::kExn)); values[0].node = block->try_info->exception; } BrOrRet(decoder, catch_case.br_imm.depth); @@ -1473,7 +1473,7 @@ class WasmGraphBuildingInterface { } if (catch_case.kind == kCatchRef) { - DCHECK_EQ(values.last().type, kWasmExnRef); + DCHECK_EQ(values.last().type, ValueType::Ref(HeapType::kExn)); values.last().node = block->try_info->exception; } BrOrRet(decoder, catch_case.br_imm.depth); diff --git a/deps/v8/test/unittests/wasm/function-body-decoder-unittest.cc b/deps/v8/test/unittests/wasm/function-body-decoder-unittest.cc index 873b855bb4d..2e7979a4e9f 100644 --- a/deps/v8/test/unittests/wasm/function-body-decoder-unittest.cc +++ b/deps/v8/test/unittests/wasm/function-body-decoder-unittest.cc @@ -2994,7 +2994,7 @@ TEST_F(FunctionBodyDecoderTest, TryTable) { U32V_1(1), CatchKind::kCatchAllRef, U32V_1(0), kExprEnd, kExprUnreachable, kExprEnd, kExprDrop}, kAppendEnd); - // // Duplicate catch-all. + // Duplicate catch-all. ExpectValidates( sigs.v_v(), {kExprBlock, kExnRefCode, WASM_TRY_TABLE_OP, U32V_1(4), @@ -3002,12 +3002,21 @@ TEST_F(FunctionBodyDecoderTest, TryTable) { CatchKind::kCatchAllRef, U32V_1(0), CatchKind::kCatchAllRef, U32V_1(0), kExprEnd, kExprUnreachable, kExprEnd, kExprDrop}, kAppendEnd); - // // Catch-all before catch. + // Catch-all before catch. ExpectValidates( sigs.v_v(), {WASM_TRY_TABLE_OP, U32V_1(2), CatchKind::kCatchAll, U32V_1(0), CatchKind::kCatch, ex, U32V_1(0), kExprEnd, kExprUnreachable}, kAppendEnd); + // Non-nullable exnref. + ValueType kNonNullableExnRef = ValueType::Ref(HeapType::kExn); + auto sig = FixedSizeSignature::Returns(kNonNullableExnRef); + uint8_t sig_id = builder.AddSignature(&sig); + ExpectValidates( + sigs.v_v(), + {kExprBlock, sig_id, WASM_TRY_TABLE_OP, U32V_1(1), CatchKind::kCatchRef, + ex, U32V_1(0), kExprEnd, kExprUnreachable, kExprEnd, kExprDrop}, + kAppendEnd); constexpr uint8_t kInvalidCatchKind = kLastCatchKind + 1; ExpectFailure(sigs.v_v(),