[Webkit-unassigned] [Bug 202433] REGRESSION (Safari 13): Accessing WebAssembly.Module creates a global Module function
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 2 07:27:16 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=202433
--- Comment #6 from William Furr <wfurr at google.com> ---
It depends on how you declare the Module global.
Declaring it as "var Module" will prevent WebAssembly.Module from overwriting it:
> Module
< ReferenceError: Can't find variable: Module
> var Module = {}
< undefined
> WebAssembly.Module
< function Module() {
[native code]
}
> Module
< {}
Declaring it was window.Module does not. Accessing WebAssembly.Module overwrites a pre-existing window.Module property, but it can be redeclared after:
> window.Module
< undefined
> window.Module = {}
< {}
> WebAssembly.Module
< function Module() {
[native code]
}
> window.Module
< function Module() {
[native code]
}
> window.Module = {}
< {}
> window.Module
< {}
My test app does have a "var Module = { ...etc... }" as the third line of script, before the Emscripten script file that uses WebAssembly.Module is even loaded. I still end up with "Module" as an alias for "WebAssembly.Module" by the end. I'm not sure why.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191002/b475af77/attachment.html>
More information about the webkit-unassigned
mailing list