Pack ResourceLoaderOptions harder.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 13:26:19 +0000 (13:26 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 13:26:19 +0000 (13:26 +0000)
<https://webkit.org/b/126972>

Make all ResourceLoaderOptions members bitfields to reduce padding,
shrinking it from 28 to 4 bytes.

Reviewed by Antti Koivisto.

* loader/ResourceLoaderOptions.h:

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

Source/WebCore/ChangeLog
Source/WebCore/loader/ResourceLoaderOptions.h

index edba9caa91ae12c870853b95bfee9d61476a80da..ed738fbb9a48a7a94b8bd48fd30b3f2b56e042b2 100644 (file)
@@ -1,3 +1,15 @@
+2014-01-14  Andreas Kling  <akling@apple.com>
+
+        Pack ResourceLoaderOptions harder.
+        <https://webkit.org/b/126972>
+
+        Make all ResourceLoaderOptions members bitfields to reduce padding,
+        shrinking it from 28 to 4 bytes.
+
+        Reviewed by Antti Koivisto.
+
+        * loader/ResourceLoaderOptions.h:
+
 2014-01-14  Andreas Kling  <akling@apple.com>
 
         Pack ResourceError harder.
index 8e1b74db55dee8745d949381ccdc15e4e28823a9..b87d98722a2cde7150127423ac1ad1abe871e0a6 100644 (file)
@@ -83,13 +83,13 @@ struct ResourceLoaderOptions {
         , requestOriginPolicy(requestOriginPolicy)
     {
     }
-    SendCallbackPolicy sendLoadCallbacks;
-    ContentSniffingPolicy sniffContent;
-    DataBufferingPolicy dataBufferingPolicy;
-    StoredCredentials allowCredentials; // Whether HTTP credentials and cookies are sent with the request.
-    ClientCredentialPolicy clientCredentialPolicy; // When we should ask the client for credentials (if we allow credentials at all).
-    SecurityCheckPolicy securityCheck;
-    RequestOriginPolicy requestOriginPolicy;
+    SendCallbackPolicy sendLoadCallbacks : 1;
+    ContentSniffingPolicy sniffContent : 1;
+    DataBufferingPolicy dataBufferingPolicy : 1;
+    StoredCredentials allowCredentials : 1; // Whether HTTP credentials and cookies are sent with the request.
+    ClientCredentialPolicy clientCredentialPolicy : 2; // When we should ask the client for credentials (if we allow credentials at all).
+    SecurityCheckPolicy securityCheck : 1;
+    RequestOriginPolicy requestOriginPolicy : 2;
 };
 
 } // namespace WebCore