Title: [87255] trunk/Source/WebKit2
Revision
87255
Author
[email protected]
Date
2011-05-24 19:52:31 -0700 (Tue, 24 May 2011)

Log Message

Fix the 32-bit build.

Explicitly use uint32_t when encoding / decoding a type that is a typedef of OSType,
as this is declared as different underlying types in 32- and 64-bit (unsigned long
vs unsigned int).

* Shared/mac/KeychainAttribute.cpp:
(CoreIPC::encode):
(CoreIPC::decode):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (87254 => 87255)


--- trunk/Source/WebKit2/ChangeLog	2011-05-25 02:35:35 UTC (rev 87254)
+++ trunk/Source/WebKit2/ChangeLog	2011-05-25 02:52:31 UTC (rev 87255)
@@ -1,3 +1,15 @@
+2011-05-24  Mark Rowe  <[email protected]>
+
+        Fix the 32-bit build.
+
+        Explicitly use uint32_t when encoding / decoding a type that is a typedef of OSType,
+        as this is declared as different underlying types in 32- and 64-bit (unsigned long
+        vs unsigned int).
+        
+        * Shared/mac/KeychainAttribute.cpp:
+        (CoreIPC::encode):
+        (CoreIPC::decode):
+
 2011-05-24  Sam Weinig  <[email protected]>
 
         Reviewed by Maciej Stachowiak.

Modified: trunk/Source/WebKit2/Shared/mac/KeychainAttribute.cpp (87254 => 87255)


--- trunk/Source/WebKit2/Shared/mac/KeychainAttribute.cpp	2011-05-25 02:35:35 UTC (rev 87254)
+++ trunk/Source/WebKit2/Shared/mac/KeychainAttribute.cpp	2011-05-25 02:52:31 UTC (rev 87255)
@@ -51,7 +51,7 @@
 
 void encode(CoreIPC::ArgumentEncoder* encoder, const WebKit::KeychainAttribute& attribute)
 {
-    encoder->encodeUInt32(attribute.tag);
+    encoder->encodeUInt32(static_cast<uint32_t>(attribute.tag));
     encoder->encodeBool(attribute.data);
     if (attribute.data)
         CoreIPC::encode(encoder, attribute.data.get());
@@ -59,9 +59,12 @@
 
 bool decode(CoreIPC::ArgumentDecoder* decoder, WebKit::KeychainAttribute& attribute)
 {
-    if (!decoder->decodeUInt32(attribute.tag))
+    uint32_t tag;
+    if (!decoder->decodeUInt32(tag))
         return false;
-    
+
+    attribute.tag = tag;
+
     bool expectData;
     if (!decoder->decodeBool(expectData))
         return false;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to