Modern IDB (Workers): More IDBConnectionProxy refactoring.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2016 21:08:20 +0000 (21:08 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2016 21:08:20 +0000 (21:08 +0000)
commit80244465e63eb7e6244805721dea15b3c2186897
treec827b79e46451ad924b97fe06d8161ffdef6fbff
parentab334efc70c2b3393c6407f3959158dc73d6ff2a
Modern IDB (Workers): More IDBConnectionProxy refactoring.
https://bugs.webkit.org/show_bug.cgi?id=156855

Reviewed by Darin Adler.

Source/WebCore:

No new tests (Covered by changes to existing tests).

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):

Hang on to the IDBConnectionProxy passed in at creation time, as it should never change:
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::create):
(WebCore::IDBFactory::IDBFactory):
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBFactory.h:

Hang on to the IDBConnectionProxy passed in at creation time, as it should never change:
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
(WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
(WebCore::WorkerGlobalScopeIndexedDatabase::from):
(WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:

Make IDBConnectionProxy ThreadSafeRefCounted:
* Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::IDBConnectionProxy::create):
* Modules/indexeddb/client/IDBConnectionProxy.h:

* dom/Document.cpp:
(WebCore::Document::idbConnectionProxy):
* dom/Document.h:

LayoutTests:

* storage/indexeddb/modern/workers-enable-expected.txt: Revert some of the PASS expectations to FAIL, just for now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/modern/workers-enable-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp
Source/WebCore/Modules/indexeddb/IDBFactory.cpp
Source/WebCore/Modules/indexeddb/IDBFactory.h
Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h
Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp
Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h