⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 235456 in webkit


Ignore:
Timestamp:
Aug 28, 2018, 9:52:45 PM (8 years ago)
Author:
youenn@apple.com
Message:

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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r235454 r235456  
     12018-08-28  Youenn Fablet  <youenn@apple.com>
     2
     3        IDBDatabase should not return true to hasPendingActivity after being stopped
     4        https://bugs.webkit.org/show_bug.cgi?id=189073
     5
     6        Reviewed by Darin Adler.
     7
     8        There is a chance that IDBDatabase::hasPendingActivity returns true.
     9        The case that might happen is when stop() is called but there are still some active/being committed transactions.
     10        In that case, hasPendingActivity will return true until these transactions get finalized.
     11        While these transactions will probably be finalized at some point, it delays GC for no good reason.
     12        And we might want in a follow-up patch to assert that ActiveDOMObject are GC-able whenever their context is stopped.
     13        For that purpose, make sure hasPendingActivity returns false when context is stopped.
     14
     15        * Modules/indexeddb/IDBDatabase.cpp:
     16        (WebCore::IDBDatabase::hasPendingActivity const):
     17
    1182018-08-28  Don Olmstead  <don.olmstead@sony.com>
    219
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp

    r234995 r235456  
    7777    ASSERT(&originThread() == &Thread::current() || mayBeGCThread());
    7878
    79     if (m_closedInServer)
     79    if (m_closedInServer || isContextStopped())
    8080        return false;
    8181
Note: See TracChangeset for help on using the changeset viewer.