Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fe5e9c826dceccf6994b4b5d9c67f2e74f82336e
https://github.com/WebKit/WebKit/commit/fe5e9c826dceccf6994b4b5d9c67f2e74f82336e
Author: Vitaly Dyachkov <[email protected]>
Date: 2026-03-02 (Mon, 02 Mar 2026)
Changed paths:
M Source/JavaScriptCore/wasm/WasmAddressType.cpp
Log Message:
-----------
REGRESSION(308379@main): Build with assertions disabled is broken
https://bugs.webkit.org/show_bug.cgi?id=308960
Reviewed by Anne van Kesteren.
The following code was added in 308379@main:
```
TypeKind AddressType::asTypeKind() const
{
switch (m_type) {
case AddressType::I32:
return TypeKind::I32;
case AddressType::I64:
return TypeKind::I64;
default:
ASSERT_NOT_REACHED("Invalid Wasm Type to AddressType conversion");
}
}
```
When assertions are disabled `ASSERT_NOT_REACHED` expands to `((void)0)`,
which causes a compile error because the function is expected to return
a value.
Because `m_type` can only have one of two possible values, this patch
removes the default case from the switch. This should trigger a warning
if another value will be added to the `AddressType` enum in the future.
`RELEASE_ASSERT_NOT_REACHED` is added to the end to suppress the compile
error for the compilers that don't understand that all code paths are
handled.
* Source/JavaScriptCore/wasm/WasmAddressType.cpp:
(JSC::Wasm::AddressType::AddressType):
(JSC::Wasm::AddressType::asTypeKind const):
Canonical link: https://commits.webkit.org/308469@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications