Title: [171565] branches/safari-600.1-branch/Source/_javascript_Core
- Revision
- 171565
- Author
- [email protected]
- Date
- 2014-07-24 17:59:34 -0700 (Thu, 24 Jul 2014)
Log Message
Merged r171558. <rdar://problem/17041912>
Modified Paths
Diff
Modified: branches/safari-600.1-branch/Source/_javascript_Core/ChangeLog (171564 => 171565)
--- branches/safari-600.1-branch/Source/_javascript_Core/ChangeLog 2014-07-25 00:59:10 UTC (rev 171564)
+++ branches/safari-600.1-branch/Source/_javascript_Core/ChangeLog 2014-07-25 00:59:34 UTC (rev 171565)
@@ -1,5 +1,29 @@
2014-07-24 Lucas Forschler <[email protected]>
+ Merge r171558
+
+ 2014-07-24 Joseph Pecoraro <[email protected]>
+
+ JSLock release should only modify the AtomicStringTable if it modified in acquire
+ https://bugs.webkit.org/show_bug.cgi?id=135143
+
+ Reviewed by Darin Adler.
+
+ * runtime/JSLock.cpp:
+ (JSC::JSLock::JSLock):
+ Initialize the member variable to nullptr.
+
+ (JSC::JSLock::willDestroyVM):
+ Update style to use nullptr instead of 0.
+
+ (JSC::JSLock::willReleaseLock):
+ We should only reset the thread data's atomic string table if
+ didAcquireLock changed it. m_entryAtomicStringTable will have
+ been set by didAcquireLock if it changed, or nullptr if it didn't.
+ This way we are sure we are balanced, regardless of m_vm changes.
+
+2014-07-24 Lucas Forschler <[email protected]>
+
Merge r171543
2014-07-24 Mark Hahnenberg <[email protected]>
Modified: branches/safari-600.1-branch/Source/_javascript_Core/runtime/JSLock.cpp (171564 => 171565)
--- branches/safari-600.1-branch/Source/_javascript_Core/runtime/JSLock.cpp 2014-07-25 00:59:10 UTC (rev 171564)
+++ branches/safari-600.1-branch/Source/_javascript_Core/runtime/JSLock.cpp 2014-07-25 00:59:34 UTC (rev 171565)
@@ -83,6 +83,7 @@
, m_lockDropDepth(0)
, m_hasExclusiveThread(false)
, m_vm(vm)
+ , m_entryAtomicStringTable(nullptr)
{
}
@@ -93,7 +94,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)
@@ -139,7 +140,10 @@
WTFThreadData& threadData = wtfThreadData();
m_vm->setLastStackTop(threadData.savedLastStackTop());
+ ASSERT(!m_entryAtomicStringTable);
m_entryAtomicStringTable = threadData.setCurrentAtomicStringTable(m_vm->atomicStringTable());
+ ASSERT(m_entryAtomicStringTable);
+
m_vm->heap.machineThreads().addCurrentThread();
}
@@ -170,7 +174,10 @@
if (m_vm)
m_vm->setStackPointerAtVMEntry(nullptr);
- wtfThreadData().setCurrentAtomicStringTable(m_entryAtomicStringTable);
+ if (m_entryAtomicStringTable) {
+ wtfThreadData().setCurrentAtomicStringTable(m_entryAtomicStringTable);
+ m_entryAtomicStringTable = nullptr;
+ }
}
void JSLock::lock(ExecState* exec)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes