Modern IDB: When IDBDatabase objects are garbage collected, they don't close their...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2016 21:49:41 +0000 (21:49 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2016 21:49:41 +0000 (21:49 +0000)
commit856db7936d0919e8339d317e5792b27853644ce8
tree952a5035d4e6fe1e8e8b637e9aba11ba6482af97
parent10bfbc09fd9a4fab9f70107e3709c7ccb4413ff0
Modern IDB: When IDBDatabase objects are garbage collected, they don't close their server connection.
<rdar://problem/25910345> and https://bugs.webkit.org/show_bug.cgi?id=159523

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/gc-closes-database-private.html
       storage/indexeddb/modern/gc-closes-database.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::IDBDatabase): New logging.
(WebCore::IDBDatabase::~IDBDatabase): Close server connection.
(WebCore::IDBDatabase::fireVersionChangeEvent): New logging.
(WebCore::IDBDatabase::dispatchEvent): New logging.

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::openDatabase): New logging.

LayoutTests:

* storage/indexeddb/modern/gc-closes-database-expected.txt: Added.
* storage/indexeddb/modern/gc-closes-database-private-expected.txt: Added.
* storage/indexeddb/modern/gc-closes-database-private.html: Added.
* storage/indexeddb/modern/gc-closes-database.html: Added.
* storage/indexeddb/modern/resources/gc-closes-database.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/modern/gc-closes-database-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/gc-closes-database-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/gc-closes-database-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/gc-closes-database.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/resources/gc-closes-database.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp