[webkit-reviews] review granted: [Bug 170488] WebAssembly: Make to a compilation API that allows for multi-VM concurrent compilations of Wasm Modules : [Attachment 306480] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 7 08:53:06 PDT 2017


JF Bastien <jfbastien at apple.com> has granted Saam Barati <sbarati at apple.com>'s
request for review:
Bug 170488: WebAssembly: Make to a compilation API that allows for multi-VM
concurrent compilations of Wasm Modules
https://bugs.webkit.org/show_bug.cgi?id=170488

Attachment 306480: patch

https://bugs.webkit.org/attachment.cgi?id=306480&action=review




--- Comment #10 from JF Bastien <jfbastien at apple.com> ---
Comment on attachment 306480
  --> https://bugs.webkit.org/attachment.cgi?id=306480
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=306480&action=review

Looks good. A few comments, and GTK is sad on isSafeToRun linking.

> Source/JavaScriptCore/runtime/PromiseDeferredTimer.cpp:47
> +    m_taskLock.lock();

Trying to understand this lock. IIUC you need it for:

 - timers
 - pending promises
 - task / drain micro tasks
 - runloop

?

It just seems weird / brittle to manually lock + unlock like this. IIUC doing
it manually allows you to lock what you need and join different things that can
be locked together?

> Source/JavaScriptCore/wasm/WasmCodeBlock.cpp:44
> +	   // The JS API insures this invariant by keeping alive the module as
it has

"ensures"

> Source/JavaScriptCore/wasm/WasmCodeBlock.h:59
> +    // called from multiple threads simultaneously.

Is the ASCII version likely to die? I'm not sure I understand the thread +
lifetime issue here.

> Source/JavaScriptCore/wasm/WasmModule.cpp:61
> +    // It's worth retrying.

How often do we retry though? As a separate patch we'll want to reduce the
number of concurrent compilations if we OOM, so I guess we can just leave a
FIXME here?

> Source/JavaScriptCore/wasm/WasmPlan.cpp:362
>	   fail(locker, ASCIILiteral("WebAssembly Plan was canceled. If you see
this error message please file a bug at bugs.webkit.org!"));

We spell it "cancelled" elsewhere. Brit spelling.


More information about the webkit-reviews mailing list