Pack ResourceError harder.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 10:39:08 +0000 (10:39 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 10:39:08 +0000 (10:39 +0000)
<https://webkit.org/b/126969>

Re-arrange the members of ResourceError to reduce padding,
shrinking it by 8 bytes.

Reviewed by Antti Koivisto.

* platform/network/ResourceErrorBase.h:
(WebCore::ResourceErrorBase::ResourceErrorBase):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/network/ResourceErrorBase.h

index 745400094b6b8395cf7a19f196874302aa484bce..edba9caa91ae12c870853b95bfee9d61476a80da 100644 (file)
@@ -1,3 +1,16 @@
+2014-01-14  Andreas Kling  <akling@apple.com>
+
+        Pack ResourceError harder.
+        <https://webkit.org/b/126969>
+
+        Re-arrange the members of ResourceError to reduce padding,
+        shrinking it by 8 bytes.
+
+        Reviewed by Antti Koivisto.
+
+        * platform/network/ResourceErrorBase.h:
+        (WebCore::ResourceErrorBase::ResourceErrorBase):
+
 2014-01-14  Andreas Kling  <akling@apple.com>
 
         Pack RenderLayer harder.
index 5b7909fdb1de01d65331c75994f938c373f2705c..b4d7770864110cc44a3c1711784fd2d59b17504b 100644 (file)
@@ -65,9 +65,9 @@ protected:
 
     ResourceErrorBase(const String& domain, int errorCode, const String& failingURL, const String& localizedDescription)
         : m_domain(domain)
-        , m_errorCode(errorCode)
         , m_failingURL(failingURL)
         , m_localizedDescription(localizedDescription)
+        , m_errorCode(errorCode)
         , m_isNull(false)
         , m_isCancellation(false)
         , m_isTimeout(false)
@@ -86,12 +86,12 @@ protected:
     static bool platformCompare(const ResourceError&, const ResourceError&) { return true; }
 
     String m_domain;
-    int m_errorCode;
     String m_failingURL;
     String m_localizedDescription;
-    bool m_isNull;
-    bool m_isCancellation;
-    bool m_isTimeout;
+    int m_errorCode;
+    bool m_isNull : 1;
+    bool m_isCancellation : 1;
+    bool m_isTimeout : 1;
 };
 
 inline bool operator==(const ResourceError& a, const ResourceError& b) { return ResourceErrorBase::compare(a, b); }