Title: [185268] trunk/Source/_javascript_Core
- Revision
- 185268
- Author
- [email protected]
- Date
- 2015-06-05 15:03:50 -0700 (Fri, 05 Jun 2015)
Log Message
DropAllLocks RELEASE_ASSERT on iOS
https://bugs.webkit.org/show_bug.cgi?id=139654
Reviewed by Mark Lam.
* runtime/JSLock.cpp:
(JSC::JSLock::dropAllLocks): Removed a comment because it duplicated
the code beneath it. Removed a FIXME because we can't ASSERT that
we're holding the lock. WebKit1 on iOS drops the lock before calling to
delegates, not knowing whether it holds the lock or not.
(JSC::JSLock::DropAllLocks::DropAllLocks): Only ASSERT that we are not
GC'ing if we hold the lock. If we do not hold the lock, it is perfectly
valid for some other thread, which does hold the lock, to be GC'ing.
What is not valid is to drop the lock in the middle of GC, since GC
must be atomic.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (185267 => 185268)
--- trunk/Source/_javascript_Core/ChangeLog 2015-06-05 22:00:54 UTC (rev 185267)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-06-05 22:03:50 UTC (rev 185268)
@@ -1,3 +1,22 @@
+2015-06-05 Geoffrey Garen <[email protected]>
+
+ DropAllLocks RELEASE_ASSERT on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=139654
+
+ Reviewed by Mark Lam.
+
+ * runtime/JSLock.cpp:
+ (JSC::JSLock::dropAllLocks): Removed a comment because it duplicated
+ the code beneath it. Removed a FIXME because we can't ASSERT that
+ we're holding the lock. WebKit1 on iOS drops the lock before calling to
+ delegates, not knowing whether it holds the lock or not.
+
+ (JSC::JSLock::DropAllLocks::DropAllLocks): Only ASSERT that we are not
+ GC'ing if we hold the lock. If we do not hold the lock, it is perfectly
+ valid for some other thread, which does hold the lock, to be GC'ing.
+ What is not valid is to drop the lock in the middle of GC, since GC
+ must be atomic.
+
2015-06-05 Filip Pizlo <[email protected]>
speculateRealNumber() should early exit if you're already a real number, not if you're already a real double.
Modified: trunk/Source/_javascript_Core/runtime/JSLock.cpp (185267 => 185268)
--- trunk/Source/_javascript_Core/runtime/JSLock.cpp 2015-06-05 22:00:54 UTC (rev 185267)
+++ trunk/Source/_javascript_Core/runtime/JSLock.cpp 2015-06-05 22:03:50 UTC (rev 185268)
@@ -212,8 +212,6 @@
return 0;
}
- // Check if this thread is currently holding the lock.
- // FIXME: Maybe we want to require this, guard with an ASSERT?
if (!currentThreadIsHoldingLock())
return 0;
@@ -265,7 +263,7 @@
if (!m_vm)
return;
wtfThreadData().resetCurrentAtomicStringTable();
- RELEASE_ASSERT(!m_vm->isCollectorBusy());
+ RELEASE_ASSERT(!m_vm->apiLock().currentThreadIsHoldingLock() || !m_vm->isCollectorBusy());
m_droppedLockCount = m_vm->apiLock().dropAllLocks(this);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes