Title: [236111] releases/WebKitGTK/webkit-2.22/Source/WebCore
Revision
236111
Author
[email protected]
Date
2018-09-18 02:16:44 -0700 (Tue, 18 Sep 2018)

Log Message

Merge r235456 - IDBDatabase should not return true to hasPendingActivity after being stopped
https://bugs.webkit.org/show_bug.cgi?id=189073

Reviewed by Darin Adler.

There is a chance that IDBDatabase::hasPendingActivity returns true.
The case that might happen is when stop() is called but there are still some active/being committed transactions.
In that case, hasPendingActivity will return true until these transactions get finalized.
While these transactions will probably be finalized at some point, it delays GC for no good reason.
And we might want in a follow-up patch to assert that ActiveDOMObject are GC-able whenever their context is stopped.
For that purpose, make sure hasPendingActivity returns false when context is stopped.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::hasPendingActivity const):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (236110 => 236111)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-09-18 09:16:40 UTC (rev 236110)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-09-18 09:16:44 UTC (rev 236111)
@@ -1,5 +1,22 @@
 2018-08-28  Youenn Fablet  <[email protected]>
 
+        IDBDatabase should not return true to hasPendingActivity after being stopped
+        https://bugs.webkit.org/show_bug.cgi?id=189073
+
+        Reviewed by Darin Adler.
+
+        There is a chance that IDBDatabase::hasPendingActivity returns true.
+        The case that might happen is when stop() is called but there are still some active/being committed transactions.
+        In that case, hasPendingActivity will return true until these transactions get finalized.
+        While these transactions will probably be finalized at some point, it delays GC for no good reason.
+        And we might want in a follow-up patch to assert that ActiveDOMObject are GC-able whenever their context is stopped.
+        For that purpose, make sure hasPendingActivity returns false when context is stopped.
+
+        * Modules/indexeddb/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::hasPendingActivity const):
+
+2018-08-28  Youenn Fablet  <[email protected]>
+
         MediaDevices should be collectable as soon as its document is stopped
         https://bugs.webkit.org/show_bug.cgi?id=189021
 

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (236110 => 236111)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp	2018-09-18 09:16:40 UTC (rev 236110)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp	2018-09-18 09:16:44 UTC (rev 236111)
@@ -76,7 +76,7 @@
 {
     ASSERT(&originThread() == &Thread::current() || mayBeGCThread());
 
-    if (m_closedInServer)
+    if (m_closedInServer || isContextStopped())
         return false;
 
     if (!m_activeTransactions.isEmpty() || !m_committingTransactions.isEmpty() || !m_abortingTransactions.isEmpty())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to