WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
302041
In JSWebAssemblyInstance.cpp, replace the blanket "using namespace Wasm" directive with specific using declarations
https://bugs.webkit.org/show_bug.cgi?id=302041
Summary
In JSWebAssemblyInstance.cpp, replace the blanket "using namespace Wasm" dire...
Vassili Bykov
Reported
2025-11-05 14:36:45 PST
Because of the unified source build mechanism, the "using namespace Wasm" directive in the JSC namespace in JSWebAssemblyInstance.cpp can cause a random build failure if a source file that uses a name from JSC which is also defined in Wasm is included in the unified source following JSWebAssemblyInstance.cpp. One such name is InternalFunction. There is JSC::InternalFunction, and also JSC::Wasm::InternalFunction. JSC::InternalFunction is used by its unqualified name as a superclass of many classes in JSC. The "using namespace Wasm" directive in JSWebAssemblyInstance.cpp brings JSC::Wasm::InternalFunction into the namespace JSC as a second definition associated with that unqualified name. This duplicate definition is then present in any namespace JSC definition appearing after JSWebAssemblyInstance.cpp in the unified source. Any file included into the unified source afterwards that defines a subclass of InternalFunction will then fail with an ambiguous reference error. To avoid this fragility, JSWebAssemblyInstance.cpp should use specific using declarations for the Wasm names it needs.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-11-05 14:36:51 PST
<
rdar://problem/164119670
>
Vassili Bykov
Comment 2
2025-11-05 14:39:01 PST
Pull request:
https://github.com/WebKit/WebKit/pull/53483
EWS
Comment 3
2025-11-05 20:14:06 PST
Committed
302625@main
(b17bfa757d0c): <
https://commits.webkit.org/302625@main
> Reviewed commits have been landed. Closing PR #53483 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug