Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e012709bf3974ae056e29b36220178b5e867d9e5
      
https://github.com/WebKit/WebKit/commit/e012709bf3974ae056e29b36220178b5e867d9e5
  Author: Sihui Liu <[email protected]>
  Date:   2023-09-15 (Fri, 15 Sep 2023)

  Changed paths:
    M LayoutTests/storage/indexeddb/database-transaction-cycle.html
    M 
LayoutTests/storage/indexeddb/resources/database-transaction-cycle-iframe.html
    M Source/WebCore/Modules/indexeddb/IDBTransaction.cpp

  Log Message:
  -----------
  [ macOS ] storage/indexeddb/database-transaction-cycle.html is a consistent 
failure
https://bugs.webkit.org/show_bug.cgi?id=261535
rdar://115457418

Reviewed by Brady Eidson.

IDBTransaction's wrapper is kept alive when its state is not Finished (see 
IDBTransaction::virtualHasPendingActivity()).
However, its state is never changed from Aborting to Finished when the failure 
is caused by closed connection. To fix
that, we now invoke didAbort() in IDBTransaction::connectionClosedFromServer 
which performs necessary cleanup tasks.

The test also has an issue that it uses global variable for IDBObjectStore, 
which will keep IDBTranaction alive (see
IDBObjectStore::ref()). To avoid such issue, this patch removes the use of 
global variables. In addition, IDBTransaction
can be destroyed when it's no longer active (and there is no reference from 
JS), so we don't need to set url of the
iframe.

* LayoutTests/storage/indexeddb/database-transaction-cycle.html:
* 
LayoutTests/storage/indexeddb/resources/database-transaction-cycle-iframe.html:
* Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::connectionClosedFromServer):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to