[webkit-reviews] review granted: [Bug 170204] WebAssembly: Worklist should periodically check in to see if there are higher priority jobs to do. : [Attachment 305777] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 29 13:35:08 PDT 2017


Saam Barati <sbarati at apple.com> has granted Keith Miller
<keith_miller at apple.com>'s request for review:
Bug 170204: WebAssembly: Worklist should periodically check in to see if there
are higher priority jobs to do.
https://bugs.webkit.org/show_bug.cgi?id=170204

Attachment 305777: Patch

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




--- Comment #4 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 305777
  --> https://bugs.webkit.org/attachment.cgi?id=305777
Patch

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

> Source/JavaScriptCore/wasm/WasmPlan.cpp:229
> +    if (UNLIKELY(m_functionLocationInBinary.isEmpty())) {
> +	   // This is a weird and rare case. We need to lock here, though,
otherwise
> +	   // one thread may Complete the Plan while another is moving to
Compiled and
> +	   // we expect state to be monotonically increasing.
> +	   LockHolder locker(m_lock);
> +	   if (hasWork())
> +	       moveToState(State::Compiled);
> +	   return;
> +    }

Why does the below code not gracefully handle this? Seems like it should Just
Work


More information about the webkit-reviews mailing list