Title: [204977] trunk/Source
Revision
204977
Author
achristen...@apple.com
Date
2016-08-25 11:23:54 -0700 (Thu, 25 Aug 2016)

Log Message

Don't store networkLoadTiming in the disk cache
https://bugs.webkit.org/show_bug.cgi?id=161161

Patch by Johan K. Jensen <johan_jen...@apple.com> 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.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (204976 => 204977)


--- 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)
@@ -1,3 +1,13 @@
+2016-08-25  Johan K. Jensen  <johan_jen...@apple.com>
+
+        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.
+
 2016-08-24  Yusuke Suzuki  <utatane....@gmail.com>
 
         [JSC] Move generic data structures out of B3

Modified: trunk/Source/WTF/wtf/Forward.h (204976 => 204977)


--- 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)
@@ -40,8 +40,6 @@
 class AtomicStringImpl;
 class BinarySemaphore;
 class CString;
-class Decoder;
-class Encoder;
 class FunctionDispatcher;
 class OrdinalNumber;
 class PrintStream;
@@ -69,8 +67,6 @@
 using WTF::AtomicStringImpl;
 using WTF::BinarySemaphore;
 using WTF::CString;
-using WTF::Decoder;
-using WTF::Encoder;
 using WTF::Function;
 using WTF::FunctionDispatcher;
 using WTF::LazyNeverDestroyed;

Modified: trunk/Source/WebCore/ChangeLog (204976 => 204977)


--- 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)
@@ -1,5 +1,18 @@
 2016-08-25  Johan K. Jensen  <johan_jen...@apple.com>
 
+        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  <johan_jen...@apple.com>
+
         Update the Resource Timing implementation
         https://bugs.webkit.org/show_bug.cgi?id=161068
 

Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.h (204976 => 204977)


--- 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)
@@ -232,7 +232,12 @@
     encoder << m_httpStatusText;
     encoder << m_httpVersion;
     encoder << m_httpHeaderFields;
-    encoder << m_networkLoadTiming;
+
+    // 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 << m_networkLoadTiming;
+
     encoder << m_httpStatusCode;
     encoder << m_certificateInfo;
     encoder.encodeEnum(m_source);
@@ -266,7 +271,8 @@
         return false;
     if (!decoder.decode(response.m_httpHeaderFields))
         return false;
-    if (!decoder.decode(response.m_networkLoadTiming))
+    // The networkLoadTiming info is only send over IPC and not stored in disk cache.
+    if (Decoder::isIPCDecoder && !decoder.decode(response.m_networkLoadTiming))
         return false;
     if (!decoder.decode(response.m_httpStatusCode))
         return false;

Modified: trunk/Source/WebKit2/ChangeLog (204976 => 204977)


--- 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)
@@ -1,3 +1,17 @@
+2016-08-25  Johan K. Jensen  <johan_jen...@apple.com>
+
+        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.
+
 2016-08-25  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [GTK][Threaded Compositor] Several flaky tests due to differences in scrollbars

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.h (204976 => 204977)


--- 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)
@@ -85,6 +85,8 @@
         return bufferIsLargeEnoughToContain(numElements * sizeof(T));
     }
 
+    static const bool isIPCDecoder = false;
+
 private:
     bool bufferIsLargeEnoughToContain(size_t) const;
     template<typename Type> bool decodeNumber(Type&);

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h (204976 => 204977)


--- 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)
@@ -71,6 +71,8 @@
     static void updateChecksumForData(SHA1&, const uint8_t*, size_t);
     template <typename Type> static void updateChecksumForNumber(SHA1&, Type);
 
+    static const bool isIPCEncoder = false;
+
 private:
     void encode(bool);
     void encode(uint8_t);

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h (204976 => 204977)


--- 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)
@@ -87,7 +87,7 @@
     size_t capacity() const { return m_capacity; }
     size_t approximateSize() const;
 
-    static const unsigned version = 9;
+    static const unsigned version = 10;
 #if PLATFORM(MAC)
     /// Allow the last stable version of the cache to co-exist with the latest development one.
     static const unsigned lastStableVersion = 9;

Modified: trunk/Source/WebKit2/Platform/IPC/Decoder.h (204976 => 204977)


--- 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)
@@ -127,6 +127,8 @@
 
     bool removeAttachment(Attachment&);
 
+    static const bool isIPCDecoder = true;
+
 protected:
     void initialize(const uint8_t* buffer, size_t bufferSize);
 

Modified: trunk/Source/WebKit2/Platform/IPC/Encoder.h (204976 => 204977)


--- 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)
@@ -84,6 +84,8 @@
     Vector<Attachment> releaseAttachments();
     void reserve(size_t);
 
+    static const bool isIPCEncoder = true;
+
 private:
     uint8_t* grow(unsigned alignment, size_t);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to