[Webkit-unassigned] [Bug 220038] New: Unable to postMessage a WebAssembly module to a worklet
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Dec 19 09:50:16 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=220038
Bug ID: 220038
Summary: Unable to postMessage a WebAssembly module to a
worklet
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Web Audio
Assignee: webkit-unassigned at lists.webkit.org
Reporter: rnewman at twinql.com
CC: cdumez at apple.com
WebAssembly modules can be sent between workers and pages via postMessage.
Both Firefox and Chrome also allow WebAssembly modules to be sent from a page to an AudioWorklet via its MessagePort:
https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/port
E.g.,
```
this.port.postMessage({ message: 'hey', module });
```
in Safari Technology Preview (117, WebKit 15611.1.7.2), this throws
```
DataCloneError: The object can not be cloned.
```
(FWIW, adding `module` to the transfer list doesn't help; I guess Safari doesn't support transfer lists either?)
The lack of this capability prevents a common code loading approach for AudioWorklets, where some large chunk of WebAssembly is loaded in a worker and sent via the page down to the AudioWorklet via the MessagePort.
I have not yet verified whether there's a workaround by posting a multi-megabyte ArrayBuffer and compiling it inside the worklet.
--
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/20201219/849f741f/attachment-0001.htm>
More information about the webkit-unassigned
mailing list