<!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>[201395] trunk/Source/WebKit2</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/201395">201395</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-05-25 12:17:57 -0700 (Wed, 25 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Simplify a few lambda captures in the network cache code
https://bugs.webkit.org/show_bug.cgi?id=158076

Reviewed by Antti Koivisto.

Simplify a few lambda captures in the network cache code by WTFMoving
upon capture.

* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):
(WebKit::NetworkCache::Statistics::writeTimerFired):
(WebKit::NetworkCache::Statistics::addHashesToDatabase):
(WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
* NetworkProcess/cache/NetworkCacheStatistics.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheSpeculativeLoadManagercpp">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheSpeculativeLoadManagerh">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheStatisticscpp">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheStatisticsh">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (201394 => 201395)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-05-25 19:08:02 UTC (rev 201394)
+++ trunk/Source/WebKit2/ChangeLog        2016-05-25 19:17:57 UTC (rev 201395)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2016-05-25  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Simplify a few lambda captures in the network cache code
+        https://bugs.webkit.org/show_bug.cgi?id=158076
+
+        Reviewed by Antti Koivisto.
+
+        Simplify a few lambda captures in the network cache code by WTFMoving
+        upon capture.
+
+        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
+        (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
+        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
+        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
+        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
+        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
+        (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
+        (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
+        (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
+        (WebKit::NetworkCache::Statistics::writeTimerFired):
+        (WebKit::NetworkCache::Statistics::addHashesToDatabase):
+        (WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
+        * NetworkProcess/cache/NetworkCacheStatistics.h:
+
</ins><span class="cx"> 2016-05-25  Fujii Hironori  &lt;Hironori.Fujii@sony.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Unix] Potential buffer overrun of m_fileDescriptors in readBytesFromSocket of ConnectionUnix.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheSpeculativeLoadManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp (201394 => 201395)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp        2016-05-25 19:08:02 UTC (rev 201394)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp        2016-05-25 19:17:57 UTC (rev 201395)
</span><span class="lines">@@ -311,7 +311,7 @@
</span><span class="cx">     return requestsHeadersMatch(load.originalRequest(), actualRequest);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SpeculativeLoadManager::retrieve(const GlobalFrameID&amp; frameID, const Key&amp; storageKey, const WebCore::ResourceRequest&amp; request, const RetrieveCompletionHandler&amp; completionHandler)
</del><ins>+bool SpeculativeLoadManager::retrieve(const GlobalFrameID&amp; frameID, const Key&amp; storageKey, const WebCore::ResourceRequest&amp; request, RetrieveCompletionHandler&amp;&amp; completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     // Check already preloaded entries.
</span><span class="cx">     if (auto preloadedEntry = m_preloadedEntries.take(storageKey)) {
</span><span class="lines">@@ -348,10 +348,8 @@
</span><span class="cx">     LOG(NetworkCacheSpeculativePreloading, &quot;(NetworkProcess) Retrieval: revalidation already in progress for '%s':&quot;, storageKey.identifier().utf8().data());
</span><span class="cx"> 
</span><span class="cx">     // FIXME: This breaks incremental loading when the revalidation is not successful.
</span><del>-    auto addResult = m_pendingRetrieveRequests.add(storageKey, nullptr);
-    if (addResult.isNewEntry)
-        addResult.iterator-&gt;value = std::make_unique&lt;Vector&lt;RetrieveCompletionHandler&gt;&gt;();
-    addResult.iterator-&gt;value-&gt;append(completionHandler);
</del><ins>+    auto addResult = m_pendingRetrieveRequests.ensure(storageKey, [] { return std::make_unique&lt;Vector&lt;RetrieveCompletionHandler&gt;&gt;(); });
+    addResult.iterator-&gt;value-&gt;append(WTFMove(completionHandler));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -407,9 +405,9 @@
</span><span class="cx">     }));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SpeculativeLoadManager::retrieveEntryFromStorage(const Key&amp; key, const RetrieveCompletionHandler&amp; completionHandler)
</del><ins>+void SpeculativeLoadManager::retrieveEntryFromStorage(const Key&amp; key, RetrieveCompletionHandler&amp;&amp; completionHandler)
</ins><span class="cx"> {
</span><del>-    m_storage.retrieve(key, static_cast&lt;unsigned&gt;(ResourceLoadPriority::Medium), [completionHandler](auto record) {
</del><ins>+    m_storage.retrieve(key, static_cast&lt;unsigned&gt;(ResourceLoadPriority::Medium), [completionHandler = WTFMove(completionHandler)](auto record) {
</ins><span class="cx">         if (!record) {
</span><span class="cx">             completionHandler(nullptr);
</span><span class="cx">             return false;
</span><span class="lines">@@ -530,11 +528,11 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SpeculativeLoadManager::retrieveSubresourcesEntry(const Key&amp; storageKey, std::function&lt;void (std::unique_ptr&lt;SubresourcesEntry&gt;)&gt; completionHandler)
</del><ins>+void SpeculativeLoadManager::retrieveSubresourcesEntry(const Key&amp; storageKey, std::function&lt;void (std::unique_ptr&lt;SubresourcesEntry&gt;)&gt;&amp;&amp; completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(storageKey.type() == &quot;resource&quot;);
</span><span class="cx">     auto subresourcesStorageKey = makeSubresourcesKey(storageKey);
</span><del>-    m_storage.retrieve(subresourcesStorageKey, static_cast&lt;unsigned&gt;(ResourceLoadPriority::Medium), [completionHandler](auto record) {
</del><ins>+    m_storage.retrieve(subresourcesStorageKey, static_cast&lt;unsigned&gt;(ResourceLoadPriority::Medium), [completionHandler = WTFMove(completionHandler)](auto record) {
</ins><span class="cx">         if (!record) {
</span><span class="cx">             completionHandler(nullptr);
</span><span class="cx">             return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheSpeculativeLoadManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h (201394 => 201395)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h        2016-05-25 19:08:02 UTC (rev 201394)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h        2016-05-25 19:17:57 UTC (rev 201395)
</span><span class="lines">@@ -52,17 +52,17 @@
</span><span class="cx">     void registerLoad(const GlobalFrameID&amp;, const WebCore::ResourceRequest&amp;, const Key&amp; resourceKey);
</span><span class="cx"> 
</span><span class="cx">     typedef std::function&lt;void (std::unique_ptr&lt;Entry&gt;)&gt; RetrieveCompletionHandler;
</span><del>-    bool retrieve(const GlobalFrameID&amp;, const Key&amp; storageKey, const WebCore::ResourceRequest&amp;, const RetrieveCompletionHandler&amp;);
</del><ins>+    bool retrieve(const GlobalFrameID&amp;, const Key&amp; storageKey, const WebCore::ResourceRequest&amp;, RetrieveCompletionHandler&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     class PreloadedEntry;
</span><span class="cx"> 
</span><span class="cx">     void addPreloadedEntry(std::unique_ptr&lt;Entry&gt;, const GlobalFrameID&amp;, Optional&lt;WebCore::ResourceRequest&gt;&amp;&amp; revalidationRequest = Nullopt);
</span><span class="cx">     void preloadEntry(const Key&amp;, const SubresourceInfo&amp;, const GlobalFrameID&amp;);
</span><del>-    void retrieveEntryFromStorage(const Key&amp;, const RetrieveCompletionHandler&amp;);
</del><ins>+    void retrieveEntryFromStorage(const Key&amp;, RetrieveCompletionHandler&amp;&amp;);
</ins><span class="cx">     void revalidateEntry(std::unique_ptr&lt;Entry&gt;, const SubresourceInfo&amp;, const GlobalFrameID&amp;);
</span><span class="cx">     bool satisfyPendingRequests(const Key&amp;, Entry*);
</span><del>-    void retrieveSubresourcesEntry(const Key&amp; storageKey, std::function&lt;void (std::unique_ptr&lt;SubresourcesEntry&gt;)&gt;);
</del><ins>+    void retrieveSubresourcesEntry(const Key&amp; storageKey, std::function&lt;void (std::unique_ptr&lt;SubresourcesEntry&gt;)&gt;&amp;&amp;);
</ins><span class="cx">     void startSpeculativeRevalidation(const GlobalFrameID&amp;, SubresourcesEntry&amp;);
</span><span class="cx"> 
</span><span class="cx">     static bool canUsePreloadedEntry(const PreloadedEntry&amp;, const WebCore::ResourceRequest&amp; actualRequest);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheStatisticscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.cpp (201394 => 201395)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.cpp        2016-05-25 19:08:02 UTC (rev 201394)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.cpp        2016-05-25 19:17:57 UTC (rev 201395)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> 
</span><span class="cx">     LOG(NetworkCache, &quot;(NetworkProcess) Bootstrapping the network cache statistics database from the network cache...&quot;);
</span><span class="cx"> 
</span><del>-    Vector&lt;StringCapture&gt; hashes;
</del><ins>+    HashSet&lt;String&gt; hashes;
</ins><span class="cx">     traverseRecordsFiles(networkCachePath, ASCIILiteral(&quot;resource&quot;), [&amp;hashes](const String&amp; fileName, const String&amp; hashString, const String&amp; type, bool isBodyBlob, const String&amp; recordDirectoryPath) {
</span><span class="cx">         if (isBodyBlob)
</span><span class="cx">             return;
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx">         if (!Key::stringToHash(hashString, hash))
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        hashes.append(hashString);
</del><ins>+        hashes.add(hashString);
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     WebCore::SQLiteTransactionInProgressAutoCounter transactionCounter;
</span><span class="lines">@@ -219,9 +219,8 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(retrieveDecision != RetrieveDecision::Yes);
</span><span class="cx"> 
</span><del>-    String hash = key.hashAsString();
-    WebCore::URL requestURL = request.url();
-    queryWasEverRequested(hash, NeedUncachedReason::No, [this, hash, requestURL, webPageID, retrieveDecision](bool wasEverRequested, const Optional&lt;StoreDecision&gt;&amp;) {
</del><ins>+    auto hash = key.hashAsString();
+    queryWasEverRequested(hash, NeedUncachedReason::No, [this, hash, requestURL = request.url(), webPageID, retrieveDecision](bool wasEverRequested, const Optional&lt;StoreDecision&gt;&amp;) {
</ins><span class="cx">         if (wasEverRequested) {
</span><span class="cx">             String diagnosticKey = retrieveDecisionToDiagnosticKey(retrieveDecision);
</span><span class="cx">             LOG(NetworkCache, &quot;(NetworkProcess) webPageID %&quot; PRIu64 &quot;: %s was previously requested but we are not using the cache, reason: %s&quot;, webPageID, requestURL.string().ascii().data(), diagnosticKey.utf8().data());
</span><span class="lines">@@ -260,9 +259,8 @@
</span><span class="cx"> 
</span><span class="cx"> void Statistics::recordRetrievalFailure(uint64_t webPageID, const Key&amp; key, const WebCore::ResourceRequest&amp; request)
</span><span class="cx"> {
</span><del>-    String hash = key.hashAsString();
-    WebCore::URL requestURL = request.url();
-    queryWasEverRequested(hash, NeedUncachedReason::Yes, [this, hash, requestURL, webPageID](bool wasPreviouslyRequested, const Optional&lt;StoreDecision&gt;&amp; storeDecision) {
</del><ins>+    auto hash = key.hashAsString();
+    queryWasEverRequested(hash, NeedUncachedReason::Yes, [this, hash, requestURL = request.url(), webPageID](bool wasPreviouslyRequested, const Optional&lt;StoreDecision&gt;&amp; storeDecision) {
</ins><span class="cx">         if (wasPreviouslyRequested) {
</span><span class="cx">             String diagnosticKey = storeDecisionToDiagnosticKey(storeDecision.value());
</span><span class="cx">             LOG(NetworkCache, &quot;(NetworkProcess) webPageID %&quot; PRIu64 &quot;: %s was previously request but is not in the cache, reason: %s&quot;, webPageID, requestURL.string().ascii().data(), diagnosticKey.utf8().data());
</span><span class="lines">@@ -333,17 +331,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><del>-    Vector&lt;StringCapture&gt; hashesToAdd;
-    copyToVector(m_hashesToAdd, hashesToAdd);
-    m_hashesToAdd.clear();
-
-    Vector&lt;std::pair&lt;StringCapture, StoreDecision&gt;&gt; storeDecisionsToAdd;
-    copyToVector(m_storeDecisionsToAdd, storeDecisionsToAdd);
-    m_storeDecisionsToAdd.clear();
-
-    shrinkIfNeeded();
-
-    serialBackgroundIOQueue().dispatch([this, hashesToAdd, storeDecisionsToAdd] {
</del><ins>+    serialBackgroundIOQueue().dispatch([this, hashesToAdd = WTFMove(m_hashesToAdd), storeDecisionsToAdd = WTFMove(m_storeDecisionsToAdd)] {
</ins><span class="cx">         if (!m_database.isOpen())
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="lines">@@ -356,6 +344,8 @@
</span><span class="cx"> 
</span><span class="cx">         writeTransaction.commit();
</span><span class="cx">     });
</span><ins>+
+    shrinkIfNeeded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Statistics::queryWasEverRequested(const String&amp; hash, NeedUncachedReason needUncachedReason, const RequestedCompletionHandler&amp; completionHandler)
</span><span class="lines">@@ -422,7 +412,7 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Statistics::addHashesToDatabase(const Vector&lt;StringCapture&gt;&amp; hashes)
</del><ins>+void Statistics::addHashesToDatabase(const HashSet&lt;String&gt;&amp; hashes)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!RunLoop::isMain());
</span><span class="cx">     ASSERT(WebCore::SQLiteDatabaseTracker::hasTransactionInProgress());
</span><span class="lines">@@ -433,14 +423,14 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; hash : hashes) {
</span><del>-        statement.bindText(1, hash.string());
</del><ins>+        statement.bindText(1, hash);
</ins><span class="cx">         if (executeSQLStatement(statement))
</span><span class="cx">             ++m_approximateEntryCount;
</span><span class="cx">         statement.reset();
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Statistics::addStoreDecisionsToDatabase(const Vector&lt;std::pair&lt;StringCapture, StoreDecision&gt;&gt;&amp; storeDecisions)
</del><ins>+void Statistics::addStoreDecisionsToDatabase(const HashMap&lt;String, NetworkCache::StoreDecision&gt;&amp; storeDecisions)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!RunLoop::isMain());
</span><span class="cx">     ASSERT(WebCore::SQLiteDatabaseTracker::hasTransactionInProgress());
</span><span class="lines">@@ -451,8 +441,8 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; pair : storeDecisions) {
</span><del>-        statement.bindText(1, pair.first.string());
-        statement.bindInt(2, static_cast&lt;int&gt;(pair.second));
</del><ins>+        statement.bindText(1, pair.key);
+        statement.bindInt(2, static_cast&lt;int&gt;(pair.value));
</ins><span class="cx">         executeSQLStatement(statement);
</span><span class="cx">         statement.reset();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheStatisticsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h (201394 => 201395)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h        2016-05-25 19:08:02 UTC (rev 201394)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h        2016-05-25 19:17:57 UTC (rev 201395)
</span><span class="lines">@@ -62,8 +62,8 @@
</span><span class="cx">     void bootstrapFromNetworkCache(const String&amp; networkCachePath);
</span><span class="cx">     void shrinkIfNeeded();
</span><span class="cx"> 
</span><del>-    void addHashesToDatabase(const Vector&lt;StringCapture&gt;&amp; hashes);
-    void addStoreDecisionsToDatabase(const Vector&lt;std::pair&lt;StringCapture, NetworkCache::StoreDecision&gt;&gt;&amp;);
</del><ins>+    void addHashesToDatabase(const HashSet&lt;String&gt;&amp; hashes);
+    void addStoreDecisionsToDatabase(const HashMap&lt;String, NetworkCache::StoreDecision&gt;&amp;);
</ins><span class="cx">     void writeTimerFired();
</span><span class="cx"> 
</span><span class="cx">     typedef std::function&lt;void (bool wasEverRequested, const Optional&lt;StoreDecision&gt;&amp;)&gt; RequestedCompletionHandler;
</span></span></pre>
</div>
</div>

</body>
</html>