Title: [171367] trunk/Source/_javascript_Core
Revision
171367
Author
joep...@webkit.org
Date
2014-07-22 15:09:34 -0700 (Tue, 22 Jul 2014)

Log Message

JSLock release should only modify the AtomicStringTable if it modified in acquire
https://bugs.webkit.org/show_bug.cgi?id=135143

Reviewed by Pratik Solanki.

* runtime/JSLock.cpp:
(JSC::JSLock::willDestroyVM):
(JSC::JSLock::willReleaseLock):
Only set the AtomicStringTable when there was a VM, to balance JSLock::didAcquireLock.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (171366 => 171367)


--- trunk/Source/_javascript_Core/ChangeLog	2014-07-22 21:46:43 UTC (rev 171366)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-07-22 22:09:34 UTC (rev 171367)
@@ -1,3 +1,15 @@
+2014-07-22  Joseph Pecoraro  <pecor...@apple.com>
+
+        JSLock release should only modify the AtomicStringTable if it modified in acquire
+        https://bugs.webkit.org/show_bug.cgi?id=135143
+
+        Reviewed by Pratik Solanki.
+
+        * runtime/JSLock.cpp:
+        (JSC::JSLock::willDestroyVM):
+        (JSC::JSLock::willReleaseLock):
+        Only set the AtomicStringTable when there was a VM, to balance JSLock::didAcquireLock.
+
 2014-07-22  Filip Pizlo  <fpi...@apple.com>
 
         Fix cloop build.

Modified: trunk/Source/_javascript_Core/runtime/JSLock.cpp (171366 => 171367)


--- trunk/Source/_javascript_Core/runtime/JSLock.cpp	2014-07-22 21:46:43 UTC (rev 171366)
+++ trunk/Source/_javascript_Core/runtime/JSLock.cpp	2014-07-22 22:09:34 UTC (rev 171367)
@@ -93,7 +93,7 @@
 void JSLock::willDestroyVM(VM* vm)
 {
     ASSERT_UNUSED(vm, m_vm == vm);
-    m_vm = 0;
+    m_vm = nullptr;
 }
 
 void JSLock::setExclusiveThread(std::thread::id threadId)
@@ -167,9 +167,11 @@
 
 void JSLock::willReleaseLock()
 {
-    if (m_vm)
-        m_vm->setStackPointerAtVMEntry(nullptr);
+    if (!m_vm)
+        return;
 
+    m_vm->setStackPointerAtVMEntry(nullptr);
+
     wtfThreadData().setCurrentAtomicStringTable(m_entryAtomicStringTable);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to