Title: [215114] trunk/Source/_javascript_Core
Revision
215114
Author
sbar...@apple.com
Date
2017-04-07 12:42:37 -0700 (Fri, 07 Apr 2017)

Log Message

WebAssembly: Module::getOrCreateCodeBlock is wrong
https://bugs.webkit.org/show_bug.cgi?id=170612

Reviewed by Keith Miller.

When we were getting a module's CodeBlock, we were checking if !runnable(),
and if !runnable(), we were re-creating the CodeBlock. This is wrong, since
!runnable() is true while the CodeBlock is compiling. Instead, we should check
if we've finished compiling, and if so, if that compilation failed.

* wasm/WasmModule.cpp:
(JSC::Wasm::Module::getOrCreateCodeBlock):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (215113 => 215114)


--- trunk/Source/_javascript_Core/ChangeLog	2017-04-07 19:31:06 UTC (rev 215113)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-04-07 19:42:37 UTC (rev 215114)
@@ -1,5 +1,20 @@
 2017-04-07  Saam Barati  <sbar...@apple.com>
 
+        WebAssembly: Module::getOrCreateCodeBlock is wrong
+        https://bugs.webkit.org/show_bug.cgi?id=170612
+
+        Reviewed by Keith Miller.
+
+        When we were getting a module's CodeBlock, we were checking if !runnable(),
+        and if !runnable(), we were re-creating the CodeBlock. This is wrong, since
+        !runnable() is true while the CodeBlock is compiling. Instead, we should check
+        if we've finished compiling, and if so, if that compilation failed.
+
+        * wasm/WasmModule.cpp:
+        (JSC::Wasm::Module::getOrCreateCodeBlock):
+
+2017-04-07  Saam Barati  <sbar...@apple.com>
+
         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
 

Modified: trunk/Source/_javascript_Core/wasm/WasmModule.cpp (215113 => 215114)


--- trunk/Source/_javascript_Core/wasm/WasmModule.cpp	2017-04-07 19:31:06 UTC (rev 215113)
+++ trunk/Source/_javascript_Core/wasm/WasmModule.cpp	2017-04-07 19:42:37 UTC (rev 215114)
@@ -61,7 +61,7 @@
     // It's worth retrying.
     // FIXME: We might want to back off retrying at some point:
     // https://bugs.webkit.org/show_bug.cgi?id=170607
-    if (!codeBlock || !codeBlock->runnable()) {
+    if (!codeBlock || (codeBlock->compilationFinished() && !codeBlock->runnable())) {
         codeBlock = CodeBlock::create(vm, mode, const_cast<ModuleInformation&>(moduleInformation()));
         m_codeBlocks[static_cast<uint8_t>(mode)] = codeBlock;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to