Changeset 127518 in webkit


Ignore:
Timestamp:
Sep 4, 2012 4:34:19 PM (12 years ago)
Author:
jsbell@chromium.org
Message:

IndexedDB: IDBRequest leaks if IDBCursor closes and no further events fired
https://bugs.webkit.org/show_bug.cgi?id=95777

Reviewed by Tony Chang.

IDBRequests are kept alive as long as they may fire events, which includes
if the associated IDBCursor object can be advanced. When the transaction
is finished the IDBCursor is notified which in turn tells the IDBRequest
that the cursor won't be the source of more events. However, if this occurs
and no further events fire the IDBRequest doesn't clear it's "has pending
activity flag". Clear the flag on the notification if the request is
otherwise complete.

No new tests - ActiveDOMObjects and leaks are persnickety.

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::finishCursor):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r127517 r127518  
     12012-09-04  Joshua Bell  <jsbell@chromium.org>
     2
     3        IndexedDB: IDBRequest leaks if IDBCursor closes and no further events fired
     4        https://bugs.webkit.org/show_bug.cgi?id=95777
     5
     6        Reviewed by Tony Chang.
     7
     8        IDBRequests are kept alive as long as they may fire events, which includes
     9        if the associated IDBCursor object can be advanced. When the transaction
     10        is finished the IDBCursor is notified which in turn tells the IDBRequest
     11        that the cursor won't be the source of more events. However, if this occurs
     12        and no further events fire the IDBRequest doesn't clear it's "has pending
     13        activity flag". Clear the flag on the notification if the request is
     14        otherwise complete.
     15
     16        No new tests - ActiveDOMObjects and leaks are persnickety.
     17
     18        * Modules/indexeddb/IDBRequest.cpp:
     19        (WebCore::IDBRequest::finishCursor):
     20
    1212012-09-04  Max Vujovic  <mvujovic@adobe.com>
    222
  • trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp

    r126461 r127518  
    233233{
    234234    m_cursorFinished = true;
     235    if (m_readyState != PENDING)
     236        m_hasPendingActivity = false;
    235237}
    236238
Note: See TracChangeset for help on using the changeset viewer.