IndexedDB: IDBDatabase and IDBTransaction are leaked in layout tests
https://bugs.webkit.org/show_bug.cgi?id=194709
Reviewed by Geoffrey Garen.
Source/WebCore:
When connection to IDB server is closed, IDBTransaction would abort without notifying IDBDatabase, so
IDBDatabase didn't clear its reference to IDBTransaction which created a reference cycle.
Also IDBTransaction didn't clear its reference to IDBRequest in this case and it led to another reference cycle
between IDBOpenDBRequest and IDBTransaction.
Test: storage/indexeddb/IDBObject-leak.html
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::connectionToServerLost):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::~IDBTransaction):
(WebCore::IDBTransaction::connectionClosedFromServer):
* Modules/indexeddb/IDBTransaction.h:
* testing/Internals.cpp:
(WebCore::Internals::numberOfIDBTransactions const):
* testing/Internals.h:
* testing/Internals.idl:
LayoutTests:
* TestExpectations:
* platform/wk2/TestExpectations:
* storage/indexeddb/IDBObject-leak-expected.txt: Added.
* storage/indexeddb/IDBObject-leak.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@242043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations
index 29817de..ada9652 100644
--- a/LayoutTests/TestExpectations
+++ b/LayoutTests/TestExpectations
@@ -130,6 +130,7 @@
http/tests/navigation/process-swap-window-open.html [ Skip ]
http/tests/navigation/useragent-reload.php [ Skip ]
storage/indexeddb/modern/opendatabase-after-storage-crash.html [ Skip ]
+storage/indexeddb/IDBObject-leak.html [ Skip ]
fast/forms/call-text-did-change-in-text-field-when-typing.html [ Skip ]
# Only Mac and iOS have an implementation of UIScriptController::doAsyncTask().