No subject


Tue May 3 15:05:30 PDT 2016


    loaderStrategy()->storeDerivedDataToCache(key, partition, type, data);

The data is keyed with the body hash of a network resource. It can be retrieved along
with the resource by specifying the type in ResourceLoaderOptions. If a related data
blob is found it will be deliver via CachedResource::didRetrieveDerivedDataFromCache()
callback.

This patch adds the mechanism but doesn't yet use it for anything.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

    Look for related resources to return if needed.

(WebKit::NetworkResourceLoader::sendResultForCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::resourceType):
 (WebKit::NetworkCache::Cache::retrieveData):
(WebKit::NetworkCache::Cache::storeData):
(WebKit::NetworkCache::Cache::makeCacheKey): Deleted.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::encodeAsStorageRecord):
(WebKit::NetworkCache::Entry::decodeStorageRecord):
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::Key::Key):
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCache::DataKey::encode):
(WebKit::NetworkCache::DataKey::decode):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::Storage::traverse):
* NetworkProcess/cache/NetworkCacheStorage.h:

    Return body hash with the Record.

* NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
(WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):
* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<SHA1::Digest>::encode):
(IPC::ArgumentCoder<SHA1::Digest>::decode):
* Platform/IPC/ArgumentCoders.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::storeDerivedDataToCache):
* WebProcess/Network/WebLoaderStrategy.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didRetrieveDerivedData):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderLoaderStrategyh">trunk/Source/WebCore/loader/LoaderStrategy.h</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadercpp">trunk/Source/WebCore/loader/ResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoaderh">trunk/Source/WebCore/loader/ResourceLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoaderOptionsh">trunk/Source/WebCore/loader/ResourceLoaderOptions.h</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceLoadercpp">trunk/Source/WebCore/loader/SubresourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceLoaderh">trunk/Source/WebCore/loader/SubresourceLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceh">trunk/Source/WebCore/loader/cache/CachedResource.h</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceLoadercpp">trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceResponseBaseh">trunk/Source/WebCore/platform/network/ResourceResponseBase.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebCoreSupportWebResourceLoadSchedulerh">trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessh">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadParameterscpp">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadParametersh">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadParameters.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCachecpp">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheh">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheEntrycpp">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheKeycpp">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheKeyh">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheStoragecpp">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheStorageh">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheSubresourcesEntrycpp">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCArgumentCoderscpp">trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCArgumentCodersh">trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebLoaderStrategycpp">trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebLoaderStrategyh">trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadercpp">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoaderh">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadermessagesin">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/ChangeLog	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2017-01-17  Antti Koivisto  &lt;antti at apple.com&gt;
+
+        Persist derived data
+        https://bugs.webkit.org/show_bug.cgi?id=167136
+
+        Reviewed by Andreas Kling.
+
+        * loader/LoaderStrategy.h:
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::didRetrieveDerivedDataFromCache):
+        * loader/ResourceLoader.h:
+        (WebCore::ResourceLoader::options):
+        * loader/ResourceLoaderOptions.h:
+        * loader/SubresourceLoader.cpp:
+        (WebCore::SubresourceLoader::didRetrieveDerivedDataFromCache):
+        * loader/SubresourceLoader.h:
+        * loader/cache/CachedResource.h:
+        (WebCore::CachedResource::didRetrieveDerivedDataFromCache):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::defaultCachedResourceOptions):
+        * platform/network/ResourceResponseBase.h:
+        (WebCore::ResourceResponseBase::cacheBodyKey):
+        (WebCore::ResourceResponseBase::setCacheBodyKey):
+        (WebCore::ResourceResponseBase::encode):
+        (WebCore::ResourceResponseBase::decode):
+
</ins><span class="cx"> 2017-01-17  Antoine Quint  &lt;graouts at apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] Turn modern media controls on by default
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderLoaderStrategyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/LoaderStrategy.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/LoaderStrategy.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/loader/LoaderStrategy.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;ResourceHandleTypes.h&quot;
</span><span class="cx"> #include &quot;ResourceLoadPriority.h&quot;
</span><span class="cx"> #include &quot;ResourceLoaderOptions.h&quot;
</span><ins>+#include &lt;wtf/SHA1.h&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -41,6 +42,7 @@
</span><span class="cx"> class ResourceLoader;
</span><span class="cx"> class ResourceRequest;
</span><span class="cx"> class ResourceResponse;
</span><ins>+class SharedBuffer;
</ins><span class="cx"> class SubresourceLoader;
</span><span class="cx"> class URL;
</span><span class="cx"> 
</span><span class="lines">@@ -59,6 +61,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void createPingHandle(NetworkingContext*, ResourceRequest&amp;, bool shouldUseCredentialStorage, bool shouldFollowRedirects) = 0;
</span><span class="cx"> 
</span><ins>+    virtual void storeDerivedDataToCache(const SHA1::Digest&amp; bodyKey, const String&amp; type, const String&amp; partition, WebCore::SharedBuffer&amp;) = 0;
+
</ins><span class="cx"> protected:
</span><span class="cx">     virtual ~LoaderStrategy();
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -744,4 +744,8 @@
</span><span class="cx">     return frameLoader() &amp;&amp; frameLoader()-&gt;isAlwaysOnLoggingAllowed();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ResourceLoader::didRetrieveDerivedDataFromCache(const String&amp;, SharedBuffer&amp;)
+{
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/loader/ResourceLoader.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -107,6 +107,7 @@
</span><span class="cx"> #if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
</span><span class="cx">     virtual void didReceiveDataArray(CFArrayRef dataArray);
</span><span class="cx"> #endif
</span><ins>+    virtual void didRetrieveDerivedDataFromCache(const String&amp; type, SharedBuffer&amp;);
</ins><span class="cx"> 
</span><span class="cx">     virtual bool shouldUseCredentialStorage();
</span><span class="cx">     virtual void didReceiveAuthenticationChallenge(const AuthenticationChallenge&amp;);
</span><span class="lines">@@ -147,6 +148,8 @@
</span><span class="cx">     const Frame* frame() const { return m_frame.get(); }
</span><span class="cx">     WEBCORE_EXPORT bool isAlwaysOnLoggingAllowed() const;
</span><span class="cx"> 
</span><ins>+    const ResourceLoaderOptions&amp; options() const { return m_options; }
+
</ins><span class="cx"> protected:
</span><span class="cx">     ResourceLoader(Frame&amp;, ResourceLoaderOptions);
</span><span class="cx"> 
</span><span class="lines">@@ -157,8 +160,6 @@
</span><span class="cx"> 
</span><span class="cx">     void didReceiveDataOrBuffer(const char*, unsigned, RefPtr&lt;SharedBuffer&gt;&amp;&amp;, long long encodedDataLength, DataPayloadType);
</span><span class="cx"> 
</span><del>-    const ResourceLoaderOptions&amp; options() { return m_options; }
-
</del><span class="cx"> #if PLATFORM(COCOA) &amp;&amp; !USE(CFURLCONNECTION)
</span><span class="cx">     NSCachedURLResponse* willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoaderOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoaderOptions.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoaderOptions.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/loader/ResourceLoaderOptions.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -32,6 +32,8 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FetchOptions.h&quot;
</span><span class="cx"> #include &quot;ResourceHandleTypes.h&quot;
</span><ins>+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -119,6 +121,8 @@
</span><span class="cx"> 
</span><span class="cx">     ClientCredentialPolicy clientCredentialPolicy { ClientCredentialPolicy::CannotAskClientForCredentials };
</span><span class="cx">     unsigned maxRedirectCount { 20 };
</span><ins>+
+    Vector&lt;String&gt; derivedCachedDataTypesToRetrieve;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -621,6 +621,13 @@
</span><span class="cx">     notifyDone();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void SubresourceLoader::didRetrieveDerivedDataFromCache(const String&amp; type, SharedBuffer&amp; buffer)
+{
+    if (m_state != Initialized)
+        return;
+    m_resource-&gt;didRetrieveDerivedDataFromCache(type, buffer);
+}
+
</ins><span class="cx"> void SubresourceLoader::notifyDone()
</span><span class="cx"> {
</span><span class="cx">     if (reachedTerminalState())
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/loader/SubresourceLoader.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -75,6 +75,7 @@
</span><span class="cx">     void didFail(const ResourceError&amp;) override;
</span><span class="cx">     void willCancel(const ResourceError&amp;) override;
</span><span class="cx">     void didCancel(const ResourceError&amp;) override;
</span><ins>+    void didRetrieveDerivedDataFromCache(const String&amp; type, SharedBuffer&amp;) override;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA) &amp;&amp; !USE(CFURLCONNECTION)
</span><span class="cx">     NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResource.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResource.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/loader/cache/CachedResource.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -258,6 +258,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void didSendData(unsigned long long /* bytesSent */, unsigned long long /* totalBytesToBeSent */) { }
</span><span class="cx"> 
</span><ins>+    virtual void didRetrieveDerivedDataFromCache(const String&amp; /* type */, SharedBuffer&amp;) { }
+
</ins><span class="cx">     void setLoadFinishTime(double finishTime) { m_loadFinishTime = finishTime; }
</span><span class="cx">     double loadFinishTime() const { return m_loadFinishTime; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -1313,7 +1313,7 @@
</span><span class="cx"> 
</span><span class="cx"> const ResourceLoaderOptions&amp; CachedResourceLoader::defaultCachedResourceOptions()
</span><span class="cx"> {
</span><del>-    static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, ClientCredentialPolicy::MayAskClientForCredentials, FetchOptions::Credentials::Include, DoSecurityCheck, FetchOptions::Mode::NoCors, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::AllowCaching);
</del><ins>+    static NeverDestroyed&lt;ResourceLoaderOptions&gt; options(SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, ClientCredentialPolicy::MayAskClientForCredentials, FetchOptions::Credentials::Include, DoSecurityCheck, FetchOptions::Mode::NoCors, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::AllowCaching);
</ins><span class="cx">     return options;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;NetworkLoadTiming.h&quot;
</span><span class="cx"> #include &quot;ParsedContentRange.h&quot;
</span><span class="cx"> #include &quot;URL.h&quot;
</span><ins>+#include &lt;wtf/SHA1.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -135,6 +136,9 @@
</span><span class="cx">     WEBCORE_EXPORT Source source() const;
</span><span class="cx">     WEBCORE_EXPORT void setSource(Source);
</span><span class="cx"> 
</span><ins>+    const std::optional&lt;SHA1::Digest&gt;&amp; cacheBodyKey() const { return m_cacheBodyKey; }
+    void setCacheBodyKey(const SHA1::Digest&amp; key) { m_cacheBodyKey = key; }
+
</ins><span class="cx">     NetworkLoadTiming&amp; networkLoadTiming() const { return m_networkLoadTiming; }
</span><span class="cx"> 
</span><span class="cx">     // The ResourceResponse subclass may &quot;shadow&quot; this method to provide platform-specific memory usage information
</span><span class="lines">@@ -210,6 +214,8 @@
</span><span class="cx"> 
</span><span class="cx">     Source m_source { Source::Unknown };
</span><span class="cx"> 
</span><ins>+    std::optional&lt;SHA1::Digest&gt; m_cacheBodyKey;
+
</ins><span class="cx">     Type m_type { Type::Default };
</span><span class="cx">     bool m_isRedirected { false };
</span><span class="cx"> };
</span><span class="lines">@@ -241,6 +247,7 @@
</span><span class="cx">     encoder &lt;&lt; m_httpStatusCode;
</span><span class="cx">     encoder &lt;&lt; m_certificateInfo;
</span><span class="cx">     encoder.encodeEnum(m_source);
</span><ins>+    encoder &lt;&lt; m_cacheBodyKey;
</ins><span class="cx">     encoder.encodeEnum(m_type);
</span><span class="cx">     encoder &lt;&lt; m_isRedirected;
</span><span class="cx"> }
</span><span class="lines">@@ -280,6 +287,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decodeEnum(response.m_source))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(response.m_cacheBodyKey))
+        return false;
</ins><span class="cx">     if (!decoder.decodeEnum(response.m_type))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(response.m_isRedirected))
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit/ChangeLog	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2017-01-17  Antti Koivisto  &lt;antti at apple.com&gt;
+
+        Persist derived data
+        https://bugs.webkit.org/show_bug.cgi?id=167136
+
+        Reviewed by Andreas Kling.
+
+        * WebCoreSupport/WebResourceLoadScheduler.h:
+
</ins><span class="cx"> 2017-01-05  Per Arne Vollan  &lt;pvollan at apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Compile error.
</span></span></pre></div>
<a id="trunkSourceWebKitWebCoreSupportWebResourceLoadSchedulerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -56,6 +56,8 @@
</span><span class="cx"> 
</span><span class="cx">     void createPingHandle(WebCore::NetworkingContext*, WebCore::ResourceRequest&amp;, bool shouldUseCredentialStorage, bool shouldFollowRedirects) override;
</span><span class="cx"> 
</span><ins>+    void storeDerivedDataToCache(const SHA1::Digest&amp;, const String&amp;, const String&amp;, WebCore::SharedBuffer&amp;) override { }
+
</ins><span class="cx">     bool isSerialLoadingEnabled() const { return m_isSerialLoadingEnabled; }
</span><span class="cx">     void setSerialLoadingEnabled(bool b) { m_isSerialLoadingEnabled = b; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -1,3 +1,74 @@
</span><ins>+2017-01-17  Antti Koivisto  &lt;antti at apple.com&gt;
+
+        Persist derived data
+        https://bugs.webkit.org/show_bug.cgi?id=167136
+
+        Reviewed by Andreas Kling.
+
+        Add a mechanism for storing arbitrary data into disk cache.
+
+        From WebCore level data can be stored using
+
+            loaderStrategy()-&gt;storeDerivedDataToCache(key, partition, type, data);
+
+        The data is keyed with the body hash of a network resource. It can be retrieved along
+        with the resource by specifying the type in ResourceLoaderOptions. If a related data
+        blob is found it will be deliver via CachedResource::didRetrieveDerivedDataFromCache()
+        callback.
+
+        This patch adds the mechanism but doesn't yet use it for anything.
+
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):
+        * NetworkProcess/NetworkConnectionToWebProcess.h:
+        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
+        * NetworkProcess/NetworkResourceLoadParameters.cpp:
+        (WebKit::NetworkResourceLoadParameters::encode):
+        (WebKit::NetworkResourceLoadParameters::decode):
+        * NetworkProcess/NetworkResourceLoadParameters.h:
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
+
+            Look for related resources to return if needed.
+
+        (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
+        * NetworkProcess/NetworkResourceLoader.h:
+        * NetworkProcess/cache/NetworkCache.cpp:
+        (WebKit::NetworkCache::resourceType):
+         (WebKit::NetworkCache::Cache::retrieveData):
+        (WebKit::NetworkCache::Cache::storeData):
+        (WebKit::NetworkCache::Cache::makeCacheKey): Deleted.
+        * NetworkProcess/cache/NetworkCache.h:
+        * NetworkProcess/cache/NetworkCacheEntry.cpp:
+        (WebKit::NetworkCache::Entry::encodeAsStorageRecord):
+        (WebKit::NetworkCache::Entry::decodeStorageRecord):
+        * NetworkProcess/cache/NetworkCacheKey.cpp:
+        (WebKit::NetworkCache::Key::Key):
+        * NetworkProcess/cache/NetworkCacheKey.h:
+        (WebKit::NetworkCache::DataKey::encode):
+        (WebKit::NetworkCache::DataKey::decode):
+        * NetworkProcess/cache/NetworkCacheStorage.cpp:
+        (WebKit::NetworkCache::Storage::readRecord):
+        (WebKit::NetworkCache::Storage::traverse):
+        * NetworkProcess/cache/NetworkCacheStorage.h:
+
+            Return body hash with the Record.
+
+        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
+        (WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):
+        * Platform/IPC/ArgumentCoders.cpp:
+        (IPC::ArgumentCoder&lt;SHA1::Digest&gt;::encode):
+        (IPC::ArgumentCoder&lt;SHA1::Digest&gt;::decode):
+        * Platform/IPC/ArgumentCoders.h:
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::WebLoaderStrategy::scheduleLoad):
+        (WebKit::WebLoaderStrategy::storeDerivedDataToCache):
+        * WebProcess/Network/WebLoaderStrategy.h:
+        * WebProcess/Network/WebResourceLoader.cpp:
+        (WebKit::WebResourceLoader::didRetrieveDerivedData):
+        * WebProcess/Network/WebResourceLoader.h:
+        * WebProcess/Network/WebResourceLoader.messages.in:
+
</ins><span class="cx"> 2017-01-17  Antoine Quint  &lt;graouts at apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] Turn modern media controls on by default
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -27,7 +27,9 @@
</span><span class="cx"> #include &quot;NetworkConnectionToWebProcess.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;BlobDataFileReferenceWithSandboxExtension.h&quot;
</span><ins>+#include &quot;DataReference.h&quot;
</ins><span class="cx"> #include &quot;NetworkBlobRegistry.h&quot;
</span><ins>+#include &quot;NetworkCache.h&quot;
</ins><span class="cx"> #include &quot;NetworkConnectionToWebProcessMessages.h&quot;
</span><span class="cx"> #include &quot;NetworkLoad.h&quot;
</span><span class="cx"> #include &quot;NetworkProcess.h&quot;
</span><span class="lines">@@ -322,6 +324,11 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void NetworkConnectionToWebProcess::storeDerivedDataToCache(const WebKit::NetworkCache::DataKey&amp; dataKey, const IPC::DataReference&amp; data)
+{
+    NetworkCache::singleton().storeData(dataKey, data.data(), data.size());
+}
+
</ins><span class="cx"> void NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession()
</span><span class="cx"> {
</span><span class="cx">     NetworkProcess::singleton().ensurePrivateBrowsingSession(SessionID::legacyPrivateSessionID());
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -44,6 +44,10 @@
</span><span class="cx"> class SyncNetworkResourceLoader;
</span><span class="cx"> typedef uint64_t ResourceLoadIdentifier;
</span><span class="cx"> 
</span><ins>+namespace NetworkCache {
+struct DataKey;
+}
+
</ins><span class="cx"> class NetworkConnectionToWebProcess : public RefCounted&lt;NetworkConnectionToWebProcess&gt;, IPC::Connection::Client {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;NetworkConnectionToWebProcess&gt; create(IPC::Connection::Identifier);
</span><span class="lines">@@ -97,6 +101,8 @@
</span><span class="cx">     void unregisterBlobURL(const WebCore::URL&amp;);
</span><span class="cx">     void writeBlobsToTemporaryFiles(const Vector&lt;String&gt;&amp; blobURLs, uint64_t requestIdentifier);
</span><span class="cx"> 
</span><ins>+    void storeDerivedDataToCache(const WebKit::NetworkCache::DataKey&amp;, const IPC::DataReference&amp;);
+
</ins><span class="cx">     void ensureLegacyPrivateBrowsingSession();
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;IPC::Connection&gt; m_connection;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -50,5 +50,7 @@
</span><span class="cx">     BlobSize(WebCore::URL url) -&gt; (uint64_t resultSize)
</span><span class="cx">     WriteBlobsToTemporaryFiles(Vector&lt;String&gt; blobURLs, uint64_t requestIdentifier)
</span><span class="cx"> 
</span><ins>+    StoreDerivedDataToCache(WebKit::NetworkCache::DataKey key, IPC::DataReference data)
+
</ins><span class="cx">     EnsureLegacyPrivateBrowsingSession()
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadParameters.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadParameters.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadParameters.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -80,6 +80,7 @@
</span><span class="cx">     encoder &lt;&lt; defersLoading;
</span><span class="cx">     encoder &lt;&lt; needsCertificateInfo;
</span><span class="cx">     encoder &lt;&lt; maximumBufferingTime;
</span><ins>+    encoder &lt;&lt; derivedCachedDataTypesToRetrieve;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool NetworkResourceLoadParameters::decode(IPC::Decoder&amp; decoder, NetworkResourceLoadParameters&amp; result)
</span><span class="lines">@@ -141,6 +142,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.maximumBufferingTime))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(result.derivedCachedDataTypesToRetrieve))
+        return false;
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadParameters.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadParameters.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadParameters.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx">     Vector&lt;RefPtr&lt;SandboxExtension&gt;&gt; requestBodySandboxExtensions; // Created automatically for the sender.
</span><span class="cx">     RefPtr&lt;SandboxExtension&gt; resourceSandboxExtension; // Created automatically for the sender.
</span><span class="cx">     std::chrono::milliseconds maximumBufferingTime { 0ms };
</span><ins>+    Vector&lt;String&gt; derivedCachedDataTypesToRetrieve;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -563,25 +563,62 @@
</span><span class="cx">     if (isSynchronous()) {
</span><span class="cx">         m_synchronousLoadData-&gt;response = entry-&gt;response();
</span><span class="cx">         sendReplyToSynchronousRequest(*m_synchronousLoadData, entry-&gt;buffer());
</span><del>-    } else {
-        bool needsContinueDidReceiveResponseMessage = isMainResource();
-        send(Messages::WebResourceLoader::DidReceiveResponse(entry-&gt;response(), needsContinueDidReceiveResponseMessage));
</del><ins>+        cleanup();
+        return;
+    }
</ins><span class="cx"> 
</span><del>-#if ENABLE(SHAREABLE_RESOURCE)
-        if (!entry-&gt;shareableResourceHandle().isNull())
-            send(Messages::WebResourceLoader::DidReceiveResource(entry-&gt;shareableResourceHandle(), currentTime()));
-        else {
</del><ins>+    bool needsContinueDidReceiveResponseMessage = isMainResource();
+    send(Messages::WebResourceLoader::DidReceiveResponse(entry-&gt;response(), needsContinueDidReceiveResponseMessage));
+
+    if (entry-&gt;sourceStorageRecord().bodyHash &amp;&amp; !m_parameters.derivedCachedDataTypesToRetrieve.isEmpty()) {
+#if ENABLE(CACHE_PARTITIONING)
+        String partition = originalRequest().cachePartition();
+#else
+        String partition;
</ins><span class="cx"> #endif
</span><del>-            sendBuffer(*entry-&gt;buffer(), entry-&gt;buffer()-&gt;size());
-            send(Messages::WebResourceLoader::DidFinishResourceLoad(currentTime()));
-#if ENABLE(SHAREABLE_RESOURCE)
</del><ins>+        auto bodyHash = *entry-&gt;sourceStorageRecord().bodyHash;
+        auto* entryPtr = entry.release();
+        auto retrieveCount = m_parameters.derivedCachedDataTypesToRetrieve.size();
+
+        for (auto&amp; type : m_parameters.derivedCachedDataTypesToRetrieve) {
+            NetworkCache::DataKey key { partition, type, bodyHash };
+            NetworkCache::singleton().retrieveData(key, [loader = makeRef(*this), entryPtr, type, retrieveCount] (const uint8_t* data, size_t size) mutable {
+                loader-&gt;m_retrievedDerivedDataCount++;
+                bool retrievedAll = loader-&gt;m_retrievedDerivedDataCount == retrieveCount;
+                std::unique_ptr&lt;NetworkCache::Entry&gt; entry(retrievedAll ? entryPtr : nullptr);
+                if (loader-&gt;hasOneRef())
+                    return;
+                if (data) {
+                    IPC::DataReference dataReference(data, size);
+                    loader-&gt;send(Messages::WebResourceLoader::DidRetrieveDerivedData(type, dataReference));
+                }
+                if (retrievedAll) {
+                    loader-&gt;sendResultForCacheEntry(WTFMove(entry));
+                    loader-&gt;cleanup();
+                }
+            });
</ins><span class="cx">         }
</span><del>-#endif
</del><ins>+        return;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    sendResultForCacheEntry(WTFMove(entry));
+
</ins><span class="cx">     cleanup();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void NetworkResourceLoader::sendResultForCacheEntry(std::unique_ptr&lt;NetworkCache::Entry&gt; entry)
+{
+#if ENABLE(SHAREABLE_RESOURCE)
+    if (!entry-&gt;shareableResourceHandle().isNull()) {
+        send(Messages::WebResourceLoader::DidReceiveResource(entry-&gt;shareableResourceHandle(), currentTime()));
+        return;
+    }
+#endif
+
+    sendBuffer(*entry-&gt;buffer(), entry-&gt;buffer()-&gt;size());
+    send(Messages::WebResourceLoader::DidFinishResourceLoad(currentTime()));
+}
+
</ins><span class="cx"> void NetworkResourceLoader::validateCacheEntry(std::unique_ptr&lt;NetworkCache::Entry&gt; entry)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_networkLoad);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -116,6 +116,7 @@
</span><span class="cx">     void tryStoreAsCacheEntry();
</span><span class="cx">     void retrieveCacheEntry(const WebCore::ResourceRequest&amp;);
</span><span class="cx">     void didRetrieveCacheEntry(std::unique_ptr&lt;NetworkCache::Entry&gt;);
</span><ins>+    void sendResultForCacheEntry(std::unique_ptr&lt;NetworkCache::Entry&gt;);
</ins><span class="cx">     void validateCacheEntry(std::unique_ptr&lt;NetworkCache::Entry&gt;);
</span><span class="cx">     void dispatchWillSendRequestForCacheEntry(std::unique_ptr&lt;NetworkCache::Entry&gt;);
</span><span class="cx"> #endif
</span><span class="lines">@@ -154,6 +155,8 @@
</span><span class="cx">     bool m_defersLoading { false };
</span><span class="cx">     bool m_hasReceivedData { false };
</span><span class="cx"> 
</span><ins>+    unsigned m_retrievedDerivedDataCount { 0 };
+
</ins><span class="cx">     WebCore::Timer m_bufferingTimer;
</span><span class="cx"> #if ENABLE(NETWORK_CACHE)
</span><span class="cx">     RefPtr&lt;WebCore::SharedBuffer&gt; m_bufferedDataForCache;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -351,7 +351,7 @@
</span><span class="cx">     auto startTime = std::chrono::system_clock::now();
</span><span class="cx">     auto priority = static_cast&lt;unsigned&gt;(request.priority());
</span><span class="cx"> 
</span><del>-    m_storage-&gt;retrieve(storageKey, priority, [this, request, completionHandler = WTFMove(completionHandler), startTime, storageKey, frameID](std::unique_ptr&lt;Storage::Record&gt; record) {
</del><ins>+    m_storage-&gt;retrieve(storageKey, priority, [this, request, completionHandler = WTFMove(completionHandler), startTime, storageKey, frameID](auto record) {
</ins><span class="cx">         if (!record) {
</span><span class="cx">             LOG(NetworkCache, &quot;(NetworkProcess) not found in storage&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -615,7 +615,31 @@
</span><span class="cx">     return m_storage ? m_storage-&gt;recordsPath() : String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Cache::retrieveData(const DataKey&amp; dataKey, Function&lt;void (const uint8_t* data, size_t size)&gt; completionHandler)
+{
+    ASSERT(isEnabled());
+
+    Key key { dataKey, m_storage-&gt;salt() };
+    m_storage-&gt;retrieve(key, 4, [completionHandler = WTFMove(completionHandler)] (auto record) {
+        if (!record || !record-&gt;body.size()) {
+            completionHandler(nullptr, 0);
+            return true;
+        }
+        completionHandler(record-&gt;body.data(), record-&gt;body.size());
+        return true;
+    });
</ins><span class="cx"> }
</span><ins>+
+void Cache::storeData(const DataKey&amp; dataKey, const uint8_t* data, size_t size)
+{
+    if (!m_storage)
+        return;
+    Key key { dataKey, m_storage-&gt;salt() };
+    Storage::Record record { key, std::chrono::system_clock::now(), { }, Data { data, size }, { } };
+    m_storage-&gt;store(record, { });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+}
+}
+
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -121,6 +121,9 @@
</span><span class="cx">     void clear();
</span><span class="cx">     void clear(std::chrono::system_clock::time_point modifiedSince, Function&lt;void ()&gt;&amp;&amp; completionHandler);
</span><span class="cx"> 
</span><ins>+    void retrieveData(const DataKey&amp;, Function&lt;void (const uint8_t* data, size_t size)&gt;);
+    void storeData(const DataKey&amp;,  const uint8_t* data, size_t);
+
</ins><span class="cx">     void dumpContentsToFile();
</span><span class="cx"> 
</span><span class="cx">     String recordsPath() const;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheEntrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">     if (m_buffer)
</span><span class="cx">         body = { reinterpret_cast&lt;const uint8_t*&gt;(m_buffer-&gt;data()), m_buffer-&gt;size() };
</span><span class="cx"> 
</span><del>-    return { m_key, m_timeStamp, header, body };
</del><ins>+    return { m_key, m_timeStamp, header, body, { } };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;Entry&gt; Entry::decodeStorageRecord(const Storage::Record&amp; storageEntry)
</span><span class="lines">@@ -112,6 +112,8 @@
</span><span class="cx">     if (!decoder.decode(entry-&gt;m_response))
</span><span class="cx">         return nullptr;
</span><span class="cx">     entry-&gt;m_response.setSource(WebCore::ResourceResponse::Source::DiskCache);
</span><ins>+    if (storageEntry.bodyHash)
+        entry-&gt;m_response.setCacheBodyKey(*storageEntry.bodyHash);
</ins><span class="cx"> 
</span><span class="cx">     bool hasVaryingRequestHeaders;
</span><span class="cx">     if (!decoder.decode(hasVaryingRequestHeaders))
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheKeycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -64,6 +64,15 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Key::Key(const DataKey&amp; dataKey, const Salt&amp; salt)
+    : m_partition(dataKey.partition)
+    , m_type(dataKey.type)
+    , m_identifier(hashAsString(dataKey.identifier))
+    , m_hash(computeHash(salt))
+    , m_partitionHash(computePartitionHash(salt))
+{
+}
+
</ins><span class="cx"> Key&amp; Key::operator=(const Key&amp; other)
</span><span class="cx"> {
</span><span class="cx">     m_partition = other.m_partition.isolatedCopy();
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheKeyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -36,6 +36,22 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> namespace NetworkCache {
</span><span class="cx"> 
</span><ins>+struct DataKey {
+    String partition;
+    String type;
+    SHA1::Digest identifier;
+
+    template &lt;class Encoder&gt; void encode(Encoder&amp; encoder) const
+    {
+        encoder &lt;&lt; partition &lt;&lt; type &lt;&lt; identifier;
+    }
+
+    template &lt;class Decoder&gt; static bool decode(Decoder&amp; decoder, DataKey&amp; dataKey)
+    {
+        return decoder.decode(dataKey.partition) &amp;&amp; decoder.decode(dataKey.type) &amp;&amp; decoder.decode(dataKey.identifier);
+    }
+};
+
</ins><span class="cx"> class Key {
</span><span class="cx"> public:
</span><span class="cx">     typedef SHA1::Digest HashType;
</span><span class="lines">@@ -44,6 +60,7 @@
</span><span class="cx">     Key(const Key&amp;);
</span><span class="cx">     Key(Key&amp;&amp;) = default;
</span><span class="cx">     Key(const String&amp; partition, const String&amp; type, const String&amp; range, const String&amp; identifier, const Salt&amp;);
</span><ins>+    Key(const DataKey&amp;, const Salt&amp;);
</ins><span class="cx"> 
</span><span class="cx">     Key&amp; operator=(const Key&amp;);
</span><span class="cx">     Key&amp; operator=(Key&amp;&amp;) = default;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheStoragecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -458,7 +458,8 @@
</span><span class="cx">         metaData.key,
</span><span class="cx">         timeStamp,
</span><span class="cx">         headerData,
</span><del>-        bodyData
</del><ins>+        bodyData,
+        metaData.bodyHash
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -837,7 +838,8 @@
</span><span class="cx">                         metaData.key,
</span><span class="cx">                         std::chrono::system_clock::time_point(metaData.epochRelativeTimeStamp),
</span><span class="cx">                         headerData,
</span><del>-                        { }
</del><ins>+                        { },
+                        metaData.bodyHash
</ins><span class="cx">                     };
</span><span class="cx">                     RecordInfo info {
</span><span class="cx">                         static_cast&lt;size_t&gt;(metaData.bodySize),
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheStorageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx">         std::chrono::system_clock::time_point timeStamp;
</span><span class="cx">         Data header;
</span><span class="cx">         Data body;
</span><ins>+        std::optional&lt;SHA1::Digest&gt; bodyHash;
</ins><span class="cx">     };
</span><span class="cx">     // This may call completion handler synchronously on failure.
</span><span class="cx">     typedef Function&lt;bool (std::unique_ptr&lt;Record&gt;)&gt; RetrieveCompletionHandler;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheSubresourcesEntrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> 
</span><span class="cx">     encoder.encodeChecksum();
</span><span class="cx"> 
</span><del>-    return { m_key, m_timeStamp, { encoder.buffer(), encoder.bufferSize() } , { } };
</del><ins>+    return { m_key, m_timeStamp, { encoder.buffer(), encoder.bufferSize() }, { }, { }};
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;SubresourcesEntry&gt; SubresourcesEntry::decodeStorageRecord(const Storage::Record&amp; storageEntry)
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -162,4 +162,15 @@
</span><span class="cx">     return decodeStringText&lt;UChar&gt;(decoder, length, result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
+void ArgumentCoder&lt;SHA1::Digest&gt;::encode(Encoder&amp; encoder, const SHA1::Digest&amp; digest)
+{
+    encoder.encodeFixedLengthData(digest.data(), sizeof(digest), 1);
+}
+
+bool ArgumentCoder&lt;SHA1::Digest&gt;::decode(Decoder&amp; decoder, SHA1::Digest&amp; digest)
+{
+    return decoder.decodeFixedLengthData(digest.data(), sizeof(digest), 1);
+}
+
</ins><span class="cx"> } // namespace IPC
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/OptionSet.h&gt;
</span><span class="cx"> #include &lt;wtf/Optional.h&gt;
</span><ins>+#include &lt;wtf/SHA1.h&gt;
</ins><span class="cx"> #include &lt;wtf/Variant.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -399,4 +400,9 @@
</span><span class="cx">     static bool decode(Decoder&amp;, String&amp;);
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+template&lt;&gt; struct ArgumentCoder&lt;SHA1::Digest&gt; {
+    static void encode(Encoder&amp;, const SHA1::Digest&amp;);
+    static bool decode(Decoder&amp;, SHA1::Digest&amp;);
+};
+
</ins><span class="cx"> } // namespace IPC
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebLoaderStrategycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;WebLoaderStrategy.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;DataReference.h&quot;
</ins><span class="cx"> #include &quot;HangDetectionDisabler.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;NetworkConnectionToWebProcessMessages.h&quot;
</span><span class="lines">@@ -216,6 +217,7 @@
</span><span class="cx">     loadParameters.defersLoading = resourceLoader.defersLoading();
</span><span class="cx">     loadParameters.needsCertificateInfo = resourceLoader.shouldIncludeCertificateInfo();
</span><span class="cx">     loadParameters.maximumBufferingTime = maximumBufferingTime(resource);
</span><ins>+    loadParameters.derivedCachedDataTypesToRetrieve = resourceLoader.options().derivedCachedDataTypesToRetrieve;
</ins><span class="cx"> 
</span><span class="cx">     ASSERT((loadParameters.webPageID &amp;&amp; loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials);
</span><span class="cx"> 
</span><span class="lines">@@ -375,5 +377,11 @@
</span><span class="cx">     WebProcess::singleton().networkConnection().connection().send(Messages::NetworkConnectionToWebProcess::LoadPing(loadParameters), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebLoaderStrategy::storeDerivedDataToCache(const SHA1::Digest&amp; bodyHash, const String&amp; type, const String&amp; partition, WebCore::SharedBuffer&amp; data)
+{
+    NetworkCache::DataKey key { partition, type, bodyHash };
+    IPC::SharedBufferDataReference dataReference { &amp;data };
+    WebProcess::singleton().networkConnection().connection().send(Messages::NetworkConnectionToWebProcess::StoreDerivedDataToCache(key, dataReference), 0);
+}
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebLoaderStrategyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -57,6 +57,8 @@
</span><span class="cx"> 
</span><span class="cx">     void createPingHandle(WebCore::NetworkingContext*, WebCore::ResourceRequest&amp;, bool shouldUseCredentialStorage, bool shouldFollowRedirects) override;
</span><span class="cx"> 
</span><ins>+    void storeDerivedDataToCache(const SHA1::Digest&amp; bodyHash, const String&amp; type, const String&amp; partition, WebCore::SharedBuffer&amp;) override;
+
</ins><span class="cx">     WebResourceLoader* webResourceLoaderForIdentifier(ResourceLoadIdentifier identifier) const { return m_webResourceLoaders.get(identifier); }
</span><span class="cx">     RefPtr&lt;WebCore::NetscapePlugInStreamLoader&gt; schedulePluginStreamLoad(WebCore::Frame&amp;, WebCore::NetscapePlugInStreamLoaderClient&amp;, const WebCore::ResourceRequest&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -135,6 +135,14 @@
</span><span class="cx">     m_coreLoader-&gt;didReceiveData(reinterpret_cast&lt;const char*&gt;(data.data()), data.size(), encodedDataLength, DataPayloadBytes);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebResourceLoader::didRetrieveDerivedData(const String&amp; type, const IPC::DataReference&amp; data)
+{
+    LOG(Network, &quot;(WebProcess) WebResourceLoader::didRetrieveDerivedData of size %lu for '%s'&quot;, data.size(), m_coreLoader-&gt;url().string().latin1().data());
+
+    auto buffer = SharedBuffer::create(data.data(), data.size());
+    m_coreLoader-&gt;didRetrieveDerivedDataFromCache(type, buffer.get());
+}
+
</ins><span class="cx"> void WebResourceLoader::didFinishResourceLoad(double finishTime)
</span><span class="cx"> {
</span><span class="cx">     LOG(Network, &quot;(WebProcess) WebResourceLoader::didFinishResourceLoad for '%s'&quot;, m_coreLoader-&gt;url().string().latin1().data());
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -78,6 +78,7 @@
</span><span class="cx">     void didSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent);
</span><span class="cx">     void didReceiveResponse(const WebCore::ResourceResponse&amp;, bool needsContinueDidReceiveResponseMessage);
</span><span class="cx">     void didReceiveData(const IPC::DataReference&amp;, int64_t encodedDataLength);
</span><ins>+    void didRetrieveDerivedData(const String&amp; type, const IPC::DataReference&amp;);
</ins><span class="cx">     void didFinishResourceLoad(double finishTime);
</span><span class="cx">     void didFailResourceLoad(const WebCore::ResourceError&amp;);
</span><span class="cx"> #if ENABLE(SHAREABLE_RESOURCE)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadermessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in (210834 => 210835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in	2017-01-18 00:42:57 UTC (rev 210834)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in	2017-01-18 01:14:33 UTC (rev 210835)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx">     DidReceiveResponse(WebCore::ResourceResponse response, bool needsContinueDidReceiveResponseMessage)
</span><span class="cx">     DidReceiveData(IPC::DataReference data, int64_t encodedDataLength)
</span><span class="cx">     DidFinishResourceLoad(double finishTime)
</span><ins>+    DidRetrieveDerivedData(String type, IPC::DataReference data)
</ins><span class="cx">     DidFailResourceLoad(WebCore::ResourceError error)
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SHAREABLE_RESOURCE)
</span></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list