WorkerCacheStorageConnection should handle the case of terminated workers
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Dec 2017 18:13:45 +0000 (18:13 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Dec 2017 18:13:45 +0000 (18:13 +0000)
commit685da21f675f2ec3aa2e0d61227f65fc86cbc751
tree324d09bc8df3a00990e32fdcfdf26cb166077b3f
parent8a79b573d29a083d49945c177e8dd2dd07680f81
WorkerCacheStorageConnection should handle the case of terminated workers
https://bugs.webkit.org/show_bug.cgi?id=180304

Patch by Youenn Fablet <youenn@apple.com> on 2017-12-04
Reviewed by Chris Dumez.

No web page observable change of behavior.

Reworked WorkerCacheStorageConnection hopping.
Instead of refing/unrefing itself, it refs the worker thread and the main thread connection.
This worker thread is then used on the way back from the main thread.

* Modules/cache/WorkerCacheStorageConnection.cpp:
(WebCore::WorkerCacheStorageConnection::create):
(WebCore::WorkerCacheStorageConnection::WorkerCacheStorageConnection):
(WebCore::WorkerCacheStorageConnection::doOpen):
(WebCore::WorkerCacheStorageConnection::doRemove):
(WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
(WebCore::WorkerCacheStorageConnection::reference):
(WebCore::WorkerCacheStorageConnection::dereference):
(WebCore::WorkerCacheStorageConnection::doRetrieveRecords):
(WebCore::WorkerCacheStorageConnection::doBatchDeleteOperation):
(WebCore::WorkerCacheStorageConnection::doBatchPutOperation):
* Modules/cache/WorkerCacheStorageConnection.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::cacheStorageConnection):
* workers/WorkerGlobalScope.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp
Source/WebCore/Modules/cache/WorkerCacheStorageConnection.h
Source/WebCore/workers/WorkerGlobalScope.cpp
Source/WebCore/workers/WorkerGlobalScope.h