[Webkit-unassigned] [Bug 166480] WebAssembly: test compile / instantiate in a Worker

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 26 12:23:51 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=166480

--- Comment #7 from JF Bastien <jfbastien at apple.com> ---
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (In reply to comment #3)
> > > > (In reply to comment #2)
> > > > > (In reply to comment #1)
> > > > > > (In reply to comment #0)
> > > > > > > I've heard from someone trying out WebAssembly that they current use compile
> > > > > > > / instantiate in a worker because some implementations aren't asynchronous.
> > > > > > > They want to do work on the main thread while compiling, so a Worker makes
> > > > > > > sense. They then transfer the Module / Instance back to the main thread.
> > > > > > > 
> > > > > > > We should have a test that this works well.
> > > > > > > 
> > > > > > > Related:
> > > > > > >  - WebAssembly: Make WebAssembly.compile truly asynchronous
> > > > > > > https://bugs.webkit.org/show_bug.cgi?id=166016
> > > > > > >  - WebAssembly: Implement the WebAssembly.instantiate API
> > > > > > > https://bugs.webkit.org/show_bug.cgi?id=165982
> > > > > > 
> > > > > > I think this should work as expected regardless of the compile API being
> > > > > > asynchronous internally.
> > > > > 
> > > > > Also, I agree we should have a test for this.
> > > > 
> > > > Right, I want to make sure postMessage-ing Module / Instance / Memory /
> > > > Table all work as expected.
> > > 
> > > Interesting. Is that the expected behavior? This is unlike anything we do
> > > elsewhere. We don't postMessage heap cells since each worker is in a
> > > different VM
> > 
> > I don't know what's expected :-D
> 
> We won't be able to compile a Module then ship over the module across
> workers. We will be able to have workers that have their own
> Modules/Instances/etc that can run independently. We need to think about
> what happens when we try to ship over an ArrayBuffer for Memory. This should
> probably not be allowed since it's backed by Wasm::Memory mmaped memory.

IIUC they serialize WebAssembly.Module, and transfer it from Worker to main thread. Apparently this works in Chrome / FF. Should we file an issue on this in the design repo?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161226/ea42ac10/attachment-0001.html>


More information about the webkit-unassigned mailing list