<!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>[204977] trunk/Source</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/204977">204977</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2016-08-25 11:23:54 -0700 (Thu, 25 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Don't store networkLoadTiming in the disk cache
https://bugs.webkit.org/show_bug.cgi?id=161161

Patch by Johan K. Jensen &lt;johan_jensen@apple.com&gt; on 2016-08-25
Reviewed by Antti Koivisto.

Source/WebCore:

No functionality changed. So, no new tests.

* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):

Source/WebKit2:

* NetworkProcess/cache/NetworkCacheStorage.h: Updated version to 10.
* NetworkProcess/cache/NetworkCacheDecoder.h:
* NetworkProcess/cache/NetworkCacheEncoder.h:
* Platform/IPC/Decoder.h:
* Platform/IPC/Encoder.h:
Added isIPCDecoder/isIPCEncoder static members.

Source/WTF:

* wtf/Forward.h:
Remove Encode and Decode forward declarations.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfForwardh">trunk/Source/WTF/wtf/Forward.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceResponseBaseh">trunk/Source/WebCore/platform/network/ResourceResponseBase.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheDecoderh">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheEncoderh">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheStorageh">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCDecoderh">trunk/Source/WebKit2/Platform/IPC/Decoder.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCEncoderh">trunk/Source/WebKit2/Platform/IPC/Encoder.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WTF/ChangeLog        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-08-25  Johan K. Jensen  &lt;johan_jensen@apple.com&gt;
+
+        Don't store networkLoadTiming in the disk cache
+        https://bugs.webkit.org/show_bug.cgi?id=161161
+
+        Reviewed by Antti Koivisto.
+
+        * wtf/Forward.h:
+        Remove Encode and Decode forward declarations.
+
</ins><span class="cx"> 2016-08-24  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [JSC] Move generic data structures out of B3
</span></span></pre></div>
<a id="trunkSourceWTFwtfForwardh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Forward.h (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Forward.h        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WTF/wtf/Forward.h        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -40,8 +40,6 @@
</span><span class="cx"> class AtomicStringImpl;
</span><span class="cx"> class BinarySemaphore;
</span><span class="cx"> class CString;
</span><del>-class Decoder;
-class Encoder;
</del><span class="cx"> class FunctionDispatcher;
</span><span class="cx"> class OrdinalNumber;
</span><span class="cx"> class PrintStream;
</span><span class="lines">@@ -69,8 +67,6 @@
</span><span class="cx"> using WTF::AtomicStringImpl;
</span><span class="cx"> using WTF::BinarySemaphore;
</span><span class="cx"> using WTF::CString;
</span><del>-using WTF::Decoder;
-using WTF::Encoder;
</del><span class="cx"> using WTF::Function;
</span><span class="cx"> using WTF::FunctionDispatcher;
</span><span class="cx"> using WTF::LazyNeverDestroyed;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WebCore/ChangeLog        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -1,5 +1,18 @@
</span><span class="cx"> 2016-08-25  Johan K. Jensen  &lt;johan_jensen@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Don't store networkLoadTiming in the disk cache
+        https://bugs.webkit.org/show_bug.cgi?id=161161
+
+        Reviewed by Antti Koivisto.
+
+        No functionality changed. So, no new tests.
+
+        * platform/network/ResourceResponseBase.h:
+        (WebCore::ResourceResponseBase::encode):
+        (WebCore::ResourceResponseBase::decode):
+
+2016-08-25  Johan K. Jensen  &lt;johan_jensen@apple.com&gt;
+
</ins><span class="cx">         Update the Resource Timing implementation
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=161068
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.h (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -232,7 +232,12 @@
</span><span class="cx">     encoder &lt;&lt; m_httpStatusText;
</span><span class="cx">     encoder &lt;&lt; m_httpVersion;
</span><span class="cx">     encoder &lt;&lt; m_httpHeaderFields;
</span><del>-    encoder &lt;&lt; m_networkLoadTiming;
</del><ins>+
+    // We don't want to put the networkLoadTiming info
+    // into the disk cache, because we will never use the old info.
+    if (Encoder::isIPCEncoder)
+        encoder &lt;&lt; m_networkLoadTiming;
+
</ins><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><span class="lines">@@ -266,7 +271,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(response.m_httpHeaderFields))
</span><span class="cx">         return false;
</span><del>-    if (!decoder.decode(response.m_networkLoadTiming))
</del><ins>+    // The networkLoadTiming info is only send over IPC and not stored in disk cache.
+    if (Decoder::isIPCDecoder &amp;&amp; !decoder.decode(response.m_networkLoadTiming))
</ins><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(response.m_httpStatusCode))
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WebKit2/ChangeLog        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-08-25  Johan K. Jensen  &lt;johan_jensen@apple.com&gt;
+
+        Don't store networkLoadTiming in the disk cache
+        https://bugs.webkit.org/show_bug.cgi?id=161161
+
+        Reviewed by Antti Koivisto.
+
+        * NetworkProcess/cache/NetworkCacheStorage.h: Updated version to 10.
+        * NetworkProcess/cache/NetworkCacheDecoder.h:
+        * NetworkProcess/cache/NetworkCacheEncoder.h:
+        * Platform/IPC/Decoder.h:
+        * Platform/IPC/Encoder.h:
+        Added isIPCDecoder/isIPCEncoder static members.
+
</ins><span class="cx"> 2016-08-25  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK][Threaded Compositor] Several flaky tests due to differences in scrollbars
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheDecoderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.h (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.h        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.h        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -85,6 +85,8 @@
</span><span class="cx">         return bufferIsLargeEnoughToContain(numElements * sizeof(T));
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    static const bool isIPCDecoder = false;
+
</ins><span class="cx"> private:
</span><span class="cx">     bool bufferIsLargeEnoughToContain(size_t) const;
</span><span class="cx">     template&lt;typename Type&gt; bool decodeNumber(Type&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheEncoderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -71,6 +71,8 @@
</span><span class="cx">     static void updateChecksumForData(SHA1&amp;, const uint8_t*, size_t);
</span><span class="cx">     template &lt;typename Type&gt; static void updateChecksumForNumber(SHA1&amp;, Type);
</span><span class="cx"> 
</span><ins>+    static const bool isIPCEncoder = false;
+
</ins><span class="cx"> private:
</span><span class="cx">     void encode(bool);
</span><span class="cx">     void encode(uint8_t);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheStorageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">     size_t capacity() const { return m_capacity; }
</span><span class="cx">     size_t approximateSize() const;
</span><span class="cx"> 
</span><del>-    static const unsigned version = 9;
</del><ins>+    static const unsigned version = 10;
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     /// Allow the last stable version of the cache to co-exist with the latest development one.
</span><span class="cx">     static const unsigned lastStableVersion = 9;
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCDecoderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Decoder.h (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Decoder.h        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WebKit2/Platform/IPC/Decoder.h        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -127,6 +127,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool removeAttachment(Attachment&amp;);
</span><span class="cx"> 
</span><ins>+    static const bool isIPCDecoder = true;
+
</ins><span class="cx"> protected:
</span><span class="cx">     void initialize(const uint8_t* buffer, size_t bufferSize);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCEncoderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Encoder.h (204976 => 204977)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Encoder.h        2016-08-25 18:22:25 UTC (rev 204976)
+++ trunk/Source/WebKit2/Platform/IPC/Encoder.h        2016-08-25 18:23:54 UTC (rev 204977)
</span><span class="lines">@@ -84,6 +84,8 @@
</span><span class="cx">     Vector&lt;Attachment&gt; releaseAttachments();
</span><span class="cx">     void reserve(size_t);
</span><span class="cx"> 
</span><ins>+    static const bool isIPCEncoder = true;
+
</ins><span class="cx"> private:
</span><span class="cx">     uint8_t* grow(unsigned alignment, size_t);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>