[webkit-changes] [WebKit/WebKit] cf4b2d: [ macOS Debug ] ASSERTION FAILED: m_wrapper and te...

Sihui noreply at github.com
Wed Sep 27 10:49:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cf4b2dd3b585e77561edbc98f822a7dcbef399c9
      https://github.com/WebKit/WebKit/commit/cf4b2dd3b585e77561edbc98f822a7dcbef399c9
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2023-09-27 (Wed, 27 Sep 2023)

  Changed paths:
    M LayoutTests/storage/indexeddb/cursor-request-cycle-expected.txt
    M LayoutTests/storage/indexeddb/cursor-request-cycle-private-expected.txt
    M LayoutTests/storage/indexeddb/resources/cursor-request-cycle.js
    M LayoutTests/storage/indexeddb/resources/value-cursor-cycle.js
    M Source/WebCore/Modules/indexeddb/IDBRequest.cpp
    M Source/WebCore/Modules/indexeddb/IDBRequest.h
    M Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
    M Source/WebCore/Modules/indexeddb/IDBTransaction.h

  Log Message:
  -----------
  [ macOS Debug ] ASSERTION FAILED: m_wrapper and text failures on storage/indexeddb/cursor-update.html
https://bugs.webkit.org/show_bug.cgi?id=259539
rdar://112943647

Reviewed by Chris Dumez.

IDBRequest generated from creating a IDBCursor will be re-used when the created cursor advances, i.e. the request's done
flag will become false again, and the request will receive event and result about the advancing operation. Therefore, we
need to keep wrapper of IDBRequest alive when the cursor can still advance, i.e. when transaction is still active and
cursor has not reached to end. We used to keep it alive only when the operation has already started, and IDBRequest and
its the wrapper go away before `IDBCursor.continue()` is called (as IDBCursor currently only holds weak reference to
IDBRequest).

* LayoutTests/storage/indexeddb/cursor-request-cycle-expected.txt:
* LayoutTests/storage/indexeddb/cursor-request-cycle-private-expected.txt:
* LayoutTests/storage/indexeddb/resources/cursor-request-cycle.js:
(onOpen.otherRequest.onsuccess.otherRequestSuccess.finalRequest.onsuccess):
(onOpen.otherRequest.onsuccess):
(onOpen):
(onTransactionComplete):
* LayoutTests/storage/indexeddb/resources/value-cursor-cycle.js:
* Source/WebCore/Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::virtualHasPendingActivity const):
(WebCore::IDBRequest::stop):
(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::transactionTransitionedToFinishing):
* Source/WebCore/Modules/indexeddb/IDBRequest.h:
* Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::transitionedToFinishing):
(WebCore::IDBTransaction::addCursorRequest):
(WebCore::IDBTransaction::doRequestOpenCursor):
(WebCore::IDBTransaction::connectionClosedFromServer):
* Source/WebCore/Modules/indexeddb/IDBTransaction.h:

Canonical link: https://commits.webkit.org/268521@main




More information about the webkit-changes mailing list