Title: [161903] trunk/Source/WebCore
Revision
161903
Author
[email protected]
Date
2014-01-13 12:56:04 -0800 (Mon, 13 Jan 2014)

Log Message

Add uint8_t specialization for WebCore::writeLittleEndian()
https://bugs.webkit.org/show_bug.cgi?id=126924

Reviewed by Darin Adler.

Specialize WebCore::writeLittleEndian() for datatype uint8_t so as to avoid
a compiler warning when right shifting a uint8_t by 8 because the result of
such a computation is undefined.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::writeLittleEndian<uint8_t>): Added.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161902 => 161903)


--- trunk/Source/WebCore/ChangeLog	2014-01-13 20:54:04 UTC (rev 161902)
+++ trunk/Source/WebCore/ChangeLog	2014-01-13 20:56:04 UTC (rev 161903)
@@ -1,5 +1,19 @@
 2014-01-13  Daniel Bates  <[email protected]>
 
+        Add uint8_t specialization for WebCore::writeLittleEndian()
+        https://bugs.webkit.org/show_bug.cgi?id=126924
+
+        Reviewed by Darin Adler.
+
+        Specialize WebCore::writeLittleEndian() for datatype uint8_t so as to avoid
+        a compiler warning when right shifting a uint8_t by 8 because the result of
+        such a computation is undefined.
+
+        * bindings/js/SerializedScriptValue.cpp:
+        (WebCore::writeLittleEndian<uint8_t>): Added.
+
+2014-01-13  Daniel Bates  <[email protected]>
+
         r161638 broke the Windows build
         https://bugs.webkit.org/show_bug.cgi?id=126916
 

Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (161902 => 161903)


--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp	2014-01-13 20:54:04 UTC (rev 161902)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp	2014-01-13 20:56:04 UTC (rev 161903)
@@ -425,6 +425,12 @@
     return true;
 }
 
+template <> bool writeLittleEndian<uint8_t>(Vector<uint8_t>& buffer, const uint8_t* values, uint32_t length)
+{
+    buffer.append(values, length);
+    return true;
+}
+
 class CloneSerializer : CloneBase {
 public:
     static SerializationReturnCode serialize(ExecState* exec, JSValue value,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to