[webkit-changes] [WebKit/WebKit] 4733e2: Fix MemoryBackingStoreTransaction::abort to restor...

Chirag Shah noreply at github.com
Mon Jul 10 16:21:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4733e28a253a7e8e571dce8dd265b81fd5990875
      https://github.com/WebKit/WebKit/commit/4733e28a253a7e8e571dce8dd265b81fd5990875
  Author: Chirag M Shah <chirag_m_shah at apple.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    A LayoutTests/storage/indexeddb/aborted-rename-of-index-crash-expected.txt
    A LayoutTests/storage/indexeddb/aborted-rename-of-index-crash.html
    A LayoutTests/storage/indexeddb/same-name-index-added-after-rename-transaction-abort-expected.txt
    A LayoutTests/storage/indexeddb/same-name-index-added-after-rename-transaction-abort.html
    M Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp
    M Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp
    M Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h

  Log Message:
  -----------
  Fix MemoryBackingStoreTransaction::abort to restore state correctly
https://bugs.webkit.org/show_bug.cgi?id=258701
rdar://111503511

Reviewed by Brady Eidson.

This change fixes what happens when we abort a transaction after
attempting to rename an index. Before this change MemoryObjectStore kept
the new name of the index in its internal state which led to crashes.

* LayoutTests/storage/indexeddb/aborted-rename-of-index-crash-expected.txt: Added.
* LayoutTests/storage/indexeddb/aborted-rename-of-index-crash.html: Added.
* LayoutTests/storage/indexeddb/same-name-index-added-after-rename-transaction-abort-expected.txt: Added.
* LayoutTests/storage/indexeddb/same-name-index-added-after-rename-transaction-abort.html: Added.
* Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::renameIndex):
* Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h:
(WebCore::IDBServer::MemoryObjectStore::info):

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




More information about the webkit-changes mailing list