[webkit-changes] [WebKit/WebKit] 95ab9c: idbobjectstore_createIndex.any.sharedworker.html i...

Sihui noreply at github.com
Wed Aug 14 14:11:51 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 95ab9cb633317673f487aee8b67261228623451c
      https://github.com/WebKit/WebKit/commit/95ab9cb633317673f487aee8b67261228623451c
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2024-08-14 (Wed, 14 Aug 2024)

  Changed paths:
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h
    M Source/WebCore/workers/WorkerGlobalScope.cpp
    M Source/WebCore/workers/WorkerGlobalScope.h

  Log Message:
  -----------
  idbobjectstore_createIndex.any.sharedworker.html is flakily failing on wpt
https://bugs.webkit.org/show_bug.cgi?id=278065
rdar://133796804

Reviewed by Brady Eidson.

IDBTransaction and IDBDatabase can hold strong reference to each other when a transaction is in progress. This is fine
as a transaction should always be committed or aborted based on current design. When transaction is finished, database
will remove its reference and break the reference cycle. However, in the case of scope being closed, we just remove
existing transactions from IDBConnectionProxy without aborting it. This makes the transactions stop receiving update
from server side and thus not make progress or finish properly. Because of the reference cycle, IDBDatabase can be
kept alive and it will block the subsequent database open requests, leading to test timeout.

To fix this, this patch makes sure to error out pending operations and transactions when scope is closed.

* Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::removeItemsMatchingCurrentThread):
(WebCore::IDBClient::IDBConnectionProxy::abortActivitiesForCurrentThread):
(WebCore::IDBClient::IDBConnectionProxy::forgetActivityForCurrentThread): Deleted.
* Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h:
* Source/WebCore/workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::prepareForDestruction):
(WebCore::WorkerGlobalScope::stopIndexedDatabase): Deleted.
* Source/WebCore/workers/WorkerGlobalScope.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list