<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[225481] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/225481">225481</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2017-12-04 10:13:45 -0800 (Mon, 04 Dec 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulescacheWorkerCacheStorageConnectioncpp">trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulescacheWorkerCacheStorageConnectionh">trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopecpp">trunk/Source/WebCore/workers/WorkerGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopeh">trunk/Source/WebCore/workers/WorkerGlobalScope.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (225480 => 225481)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2017-12-04 16:45:51 UTC (rev 225480)
+++ trunk/Source/WebCore/ChangeLog      2017-12-04 18:13:45 UTC (rev 225481)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2017-12-04  Youenn Fablet  <youenn@apple.com>
+
+        WorkerCacheStorageConnection should handle the case of terminated workers
+        https://bugs.webkit.org/show_bug.cgi?id=180304
+
+        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:
+
</ins><span class="cx"> 2017-12-04  Frederic Wang  <fwang@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes
</span></span></pre></div>
<a id="trunkSourceWebCoreModulescacheWorkerCacheStorageConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp (225480 => 225481)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp      2017-12-04 16:45:51 UTC (rev 225480)
+++ trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp 2017-12-04 18:13:45 UTC (rev 225481)
</span><span class="lines">@@ -91,17 +91,15 @@
</span><span class="cx"> Ref<WorkerCacheStorageConnection> WorkerCacheStorageConnection::create(WorkerGlobalScope& scope)
</span><span class="cx"> {
</span><span class="cx">     auto connection = adoptRef(*new WorkerCacheStorageConnection(scope));
</span><del>-    callOnMainThread([protectedConnection = connection.copyRef()]() mutable {
-        ASSERT(isMainThread());
-        protectedConnection->m_mainThreadConnection = protectedConnection->m_proxy.createCacheStorageConnection();
</del><ins>+    callOnMainThreadAndWait([workerThread = makeRef(scope.thread()), connection = connection.ptr()]() mutable {
+        connection->m_mainThreadConnection = workerThread->workerLoaderProxy().createCacheStorageConnection();
</ins><span class="cx">     });
</span><ins>+    ASSERT(connection->m_mainThreadConnection);
</ins><span class="cx">     return connection;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WorkerCacheStorageConnection::WorkerCacheStorageConnection(WorkerGlobalScope& scope)
</span><span class="cx">     : m_scope(scope)
</span><del>-    , m_proxy(m_scope.thread().workerLoaderProxy())
-    , m_taskMode(WorkerRunLoop::defaultMode().isolatedCopy())
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -113,15 +111,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WorkerCacheStorageConnection::doOpen(uint64_t requestIdentifier, const String& origin, const String& cacheName)
</span><span class="cx"> {
</span><del>-    callOnMainThread([this, protectedThis = makeRef(*this), requestIdentifier, origin = origin.isolatedCopy(), cacheName = cacheName.isolatedCopy()]() mutable {
-        ASSERT(isMainThread());
-        ASSERT(m_mainThreadConnection);
-
-        m_mainThreadConnection->open(origin, cacheName, [this, protectedThis = WTFMove(protectedThis), requestIdentifier](const CacheIdentifierOrError& result) mutable {
-            m_proxy.postTaskForModeToWorkerGlobalScope([this, protectedThis = WTFMove(protectedThis), requestIdentifier, result](ScriptExecutionContext& context) mutable {
-                ASSERT_UNUSED(context, context.isWorkerGlobalScope());
-                openCompleted(requestIdentifier, result);
-            }, m_taskMode);
</del><ins>+    callOnMainThread([workerThread = makeRef(m_scope.thread()), mainThreadConnection = m_mainThreadConnection, requestIdentifier, origin = origin.isolatedCopy(), cacheName = cacheName.isolatedCopy()] () mutable {
+        mainThreadConnection->open(origin, cacheName, [workerThread = WTFMove(workerThread), requestIdentifier] (const CacheIdentifierOrError& result) mutable {
+            workerThread->runLoop().postTaskForMode([requestIdentifier, result] (auto& scope) mutable {
+                downcast<WorkerGlobalScope>(scope).cacheStorageConnection().openCompleted(requestIdentifier, result);
+            }, WorkerRunLoop::defaultMode());
</ins><span class="cx">         });
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="lines">@@ -128,16 +122,12 @@
</span><span class="cx"> 
</span><span class="cx"> void WorkerCacheStorageConnection::doRemove(uint64_t requestIdentifier, uint64_t cacheIdentifier)
</span><span class="cx"> {
</span><del>-    callOnMainThread([this, protectedThis = makeRef(*this), requestIdentifier, cacheIdentifier]() mutable {
-        ASSERT(isMainThread());
-        ASSERT(m_mainThreadConnection);
-
-        m_mainThreadConnection->remove(cacheIdentifier, [this, protectedThis = WTFMove(protectedThis), requestIdentifier, cacheIdentifier](const CacheIdentifierOrError& result) mutable {
</del><ins>+    callOnMainThread([workerThread = makeRef(m_scope.thread()), mainThreadConnection = m_mainThreadConnection, requestIdentifier, cacheIdentifier] () mutable {
+        mainThreadConnection->remove(cacheIdentifier, [workerThread = WTFMove(workerThread), requestIdentifier, cacheIdentifier] (const CacheIdentifierOrError& result) mutable {
</ins><span class="cx">             ASSERT_UNUSED(cacheIdentifier, !result.hasValue() || result.value().identifier == cacheIdentifier);
</span><del>-            m_proxy.postTaskForModeToWorkerGlobalScope([this, protectedThis = WTFMove(protectedThis), requestIdentifier, result](ScriptExecutionContext& context) mutable {
-                ASSERT_UNUSED(context, context.isWorkerGlobalScope());
-                removeCompleted(requestIdentifier, result);
-            }, m_taskMode);
</del><ins>+            workerThread->runLoop().postTaskForMode([requestIdentifier, result] (auto& scope) mutable {
+                downcast<WorkerGlobalScope>(scope).cacheStorageConnection().removeCompleted(requestIdentifier, result);
+            }, WorkerRunLoop::defaultMode());
</ins><span class="cx">         });
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="lines">@@ -144,11 +134,8 @@
</span><span class="cx"> 
</span><span class="cx"> void WorkerCacheStorageConnection::doRetrieveCaches(uint64_t requestIdentifier, const String& origin, uint64_t updateCounter)
</span><span class="cx"> {
</span><del>-    callOnMainThread([this, protectedThis = makeRef(*this), requestIdentifier, origin = origin.isolatedCopy(), updateCounter]() mutable {
-        ASSERT(isMainThread());
-        ASSERT(m_mainThreadConnection);
-
-        m_mainThreadConnection->retrieveCaches(origin, updateCounter, [this, protectedThis = WTFMove(protectedThis), requestIdentifier](CacheInfosOrError&& result) mutable {
</del><ins>+    callOnMainThread([workerThread = makeRef(m_scope.thread()), mainThreadConnection = m_mainThreadConnection, requestIdentifier, origin = origin.isolatedCopy(), updateCounter] () mutable {
+        mainThreadConnection->retrieveCaches(origin, updateCounter, [workerThread = WTFMove(workerThread), requestIdentifier] (CacheInfosOrError&& result) mutable {
</ins><span class="cx">             CacheInfosOrError isolatedResult;
</span><span class="cx">             if (!result.hasValue())
</span><span class="cx">                 isolatedResult = WTFMove(result);
</span><span class="lines">@@ -155,10 +142,9 @@
</span><span class="cx">             else
</span><span class="cx">                 isolatedResult = result.value().isolatedCopy();
</span><span class="cx"> 
</span><del>-            m_proxy.postTaskForModeToWorkerGlobalScope([this, protectedThis = WTFMove(protectedThis), requestIdentifier, result = WTFMove(isolatedResult)](ScriptExecutionContext& context) mutable {
-                ASSERT_UNUSED(context, context.isWorkerGlobalScope());
-                updateCaches(requestIdentifier, WTFMove(result));
-            }, m_taskMode);
</del><ins>+            workerThread->runLoop().postTaskForMode([requestIdentifier, result = WTFMove(isolatedResult)] (auto& scope) mutable {
+                downcast<WorkerGlobalScope>(scope).cacheStorageConnection().updateCaches(requestIdentifier, WTFMove(result));
+            }, WorkerRunLoop::defaultMode());
</ins><span class="cx">         });
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="lines">@@ -165,21 +151,15 @@
</span><span class="cx"> 
</span><span class="cx"> void WorkerCacheStorageConnection::reference(uint64_t cacheIdentifier)
</span><span class="cx"> {
</span><del>-    callOnMainThread([this, protectedThis = makeRef(*this), cacheIdentifier]() {
-        ASSERT(isMainThread());
-        ASSERT(m_mainThreadConnection);
-
-        m_mainThreadConnection->reference(cacheIdentifier);
</del><ins>+    callOnMainThread([mainThreadConnection = m_mainThreadConnection, cacheIdentifier]() {
+        mainThreadConnection->reference(cacheIdentifier);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WorkerCacheStorageConnection::dereference(uint64_t cacheIdentifier)
</span><span class="cx"> {
</span><del>-    callOnMainThread([this, protectedThis = makeRef(*this), cacheIdentifier]() {
-        ASSERT(isMainThread());
-        ASSERT(m_mainThreadConnection);
-
-        m_mainThreadConnection->dereference(cacheIdentifier);
</del><ins>+    callOnMainThread([mainThreadConnection = m_mainThreadConnection, cacheIdentifier]() {
+        mainThreadConnection->dereference(cacheIdentifier);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -210,15 +190,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WorkerCacheStorageConnection::doRetrieveRecords(uint64_t requestIdentifier, uint64_t cacheIdentifier, const URL& url)
</span><span class="cx"> {
</span><del>-    callOnMainThread([this, protectedThis = makeRef(*this), requestIdentifier, cacheIdentifier, url = url.isolatedCopy()]() mutable {
-        ASSERT(isMainThread());
-        ASSERT(m_mainThreadConnection);
-
-        m_mainThreadConnection->retrieveRecords(cacheIdentifier, url, [this, protectedThis = WTFMove(protectedThis), requestIdentifier](RecordsOrError&& result) mutable {
-            m_proxy.postTaskForModeToWorkerGlobalScope([this, protectedThis = WTFMove(protectedThis), result = recordsDataOrErrorFromRecords(result), requestIdentifier](ScriptExecutionContext& context) mutable {
-                ASSERT_UNUSED(context, context.isWorkerGlobalScope());
-                updateRecords(requestIdentifier, recordsOrErrorFromRecordsData(WTFMove(result)));
-            }, m_taskMode);
</del><ins>+    callOnMainThread([workerThread = makeRef(m_scope.thread()), mainThreadConnection = m_mainThreadConnection, requestIdentifier, cacheIdentifier, url = url.isolatedCopy()]() mutable {
+        mainThreadConnection->retrieveRecords(cacheIdentifier, url, [workerThread = WTFMove(workerThread), requestIdentifier](RecordsOrError&& result) mutable {
+            workerThread->runLoop().postTaskForMode([result = recordsDataOrErrorFromRecords(result), requestIdentifier] (auto& scope) mutable {
+                downcast<WorkerGlobalScope>(scope).cacheStorageConnection().updateRecords(requestIdentifier, recordsOrErrorFromRecordsData(WTFMove(result)));
+            }, WorkerRunLoop::defaultMode());
</ins><span class="cx">         });
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="lines">@@ -225,16 +201,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WorkerCacheStorageConnection::doBatchDeleteOperation(uint64_t requestIdentifier, uint64_t cacheIdentifier, const ResourceRequest& request, CacheQueryOptions&& options)
</span><span class="cx"> {
</span><del>-    callOnMainThread([this, protectedThis = makeRef(*this), requestIdentifier, cacheIdentifier, request = request.isolatedCopy(), options = options.isolatedCopy()]() mutable {
-        ASSERT(isMainThread());
-        ASSERT(m_mainThreadConnection);
-
-        m_mainThreadConnection->batchDeleteOperation(cacheIdentifier, request, WTFMove(options), [this, protectedThis = WTFMove(protectedThis), requestIdentifier](RecordIdentifiersOrError&& result) mutable {
-
-            m_proxy.postTaskForModeToWorkerGlobalScope([this, protectedThis = WTFMove(protectedThis), requestIdentifier, result = WTFMove(result)](ScriptExecutionContext& context) mutable {
-                ASSERT_UNUSED(context, context.isWorkerGlobalScope());
-                deleteRecordsCompleted(requestIdentifier, WTFMove(result));
-            }, m_taskMode);
</del><ins>+    callOnMainThread([workerThread = makeRef(m_scope.thread()), mainThreadConnection = m_mainThreadConnection, requestIdentifier, cacheIdentifier, request = request.isolatedCopy(), options = options.isolatedCopy()]() mutable {
+        mainThreadConnection->batchDeleteOperation(cacheIdentifier, request, WTFMove(options), [workerThread = WTFMove(workerThread), requestIdentifier](RecordIdentifiersOrError&& result) mutable {
+            workerThread->runLoop().postTaskForMode([requestIdentifier, result = WTFMove(result)] (auto& scope) mutable {
+                downcast<WorkerGlobalScope>(scope).cacheStorageConnection().deleteRecordsCompleted(requestIdentifier, WTFMove(result));
+            }, WorkerRunLoop::defaultMode());
</ins><span class="cx">         });
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="lines">@@ -241,16 +212,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WorkerCacheStorageConnection::doBatchPutOperation(uint64_t requestIdentifier, uint64_t cacheIdentifier, Vector<Record>&& records)
</span><span class="cx"> {
</span><del>-    callOnMainThread([this, protectedThis = makeRef(*this), requestIdentifier, cacheIdentifier, recordsData = recordsDataFromRecords(records)]() mutable {
-        ASSERT(isMainThread());
-        ASSERT(m_mainThreadConnection);
-
-        m_mainThreadConnection->batchPutOperation(cacheIdentifier, recordsFromRecordsData(WTFMove(recordsData)), [this, protectedThis = WTFMove(protectedThis), requestIdentifier](RecordIdentifiersOrError&& result) mutable {
-
-            m_proxy.postTaskForModeToWorkerGlobalScope([this, protectedThis = WTFMove(protectedThis), requestIdentifier, result = WTFMove(result)](ScriptExecutionContext& context) mutable {
-                ASSERT_UNUSED(context, context.isWorkerGlobalScope());
-                putRecordsCompleted(requestIdentifier, WTFMove(result));
-            }, m_taskMode);
</del><ins>+    callOnMainThread([workerThread = makeRef(m_scope.thread()), mainThreadConnection = m_mainThreadConnection, requestIdentifier, cacheIdentifier, recordsData = recordsDataFromRecords(records)]() mutable {
+        mainThreadConnection->batchPutOperation(cacheIdentifier, recordsFromRecordsData(WTFMove(recordsData)), [workerThread = WTFMove(workerThread), requestIdentifier] (RecordIdentifiersOrError&& result) mutable {
+            workerThread->runLoop().postTaskForMode([requestIdentifier, result = WTFMove(result)] (auto& scope) mutable {
+                downcast<WorkerGlobalScope>(scope).cacheStorageConnection().putRecordsCompleted(requestIdentifier, WTFMove(result));
+            }, WorkerRunLoop::defaultMode());
</ins><span class="cx">         });
</span><span class="cx">     });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulescacheWorkerCacheStorageConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.h (225480 => 225481)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.h        2017-12-04 16:45:51 UTC (rev 225480)
+++ trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.h   2017-12-04 18:13:45 UTC (rev 225481)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> private:
</span><span class="cx">     explicit WorkerCacheStorageConnection(WorkerGlobalScope&);
</span><span class="cx"> 
</span><del>-    // WebCore::CacheStorageConnection
</del><ins>+    // WebCore::CacheStorageConnection.
</ins><span class="cx">     void doOpen(uint64_t requestIdentifier, const String& origin, const String& cacheName) final;
</span><span class="cx">     void doRemove(uint64_t requestIdentifier, uint64_t cacheIdentifier) final;
</span><span class="cx">     void doRetrieveCaches(uint64_t requestIdentifier, const String& origin, uint64_t updateCounter) final;
</span><span class="lines">@@ -55,8 +55,6 @@
</span><span class="cx">     void doBatchPutOperation(uint64_t requestIdentifier, uint64_t cacheIdentifier, Vector<DOMCacheEngine::Record>&&) final;
</span><span class="cx"> 
</span><span class="cx">     WorkerGlobalScope& m_scope;
</span><del>-    WorkerLoaderProxy& m_proxy;
-    String m_taskMode;
</del><span class="cx"> 
</span><span class="cx">     RefPtr<CacheStorageConnection> m_mainThreadConnection;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (225480 => 225481)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp       2017-12-04 16:45:51 UTC (rev 225480)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp  2017-12-04 18:13:45 UTC (rev 225481)
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">     return *m_performance;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CacheStorageConnection& WorkerGlobalScope::cacheStorageConnection()
</del><ins>+WorkerCacheStorageConnection& WorkerGlobalScope::cacheStorageConnection()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_cacheStorageConnection)
</span><span class="cx">         m_cacheStorageConnection = WorkerCacheStorageConnection::create(*this);
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (225480 => 225481)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.h 2017-12-04 16:45:51 UTC (rev 225480)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h    2017-12-04 18:13:45 UTC (rev 225481)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     void stopIndexedDatabase();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    CacheStorageConnection& cacheStorageConnection();
</del><ins>+    WorkerCacheStorageConnection& cacheStorageConnection();
</ins><span class="cx"> 
</span><span class="cx">     WorkerScriptController* script() { return m_script.get(); }
</span><span class="cx">     void clearScript() { m_script = nullptr; }
</span></span></pre>
</div>
</div>

</body>
</html>