Title: [283618] trunk/Source/WebKit
Revision
283618
Author
[email protected]
Date
2021-10-06 08:21:31 -0700 (Wed, 06 Oct 2021)

Log Message

IPC SimpleArgumentEncoder should static_assert(std::is_trivially_copyable<T>)
https://bugs.webkit.org/show_bug.cgi?id=230743
<rdar://problem/83757335>

Reviewed by Kimmo Kinnunen.

Add static_assert(std::is_trivially_copyable<T>) to IPC SimpleArgumentEncoder to avoid misuses.

* Platform/IPC/ArgumentCoders.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (283617 => 283618)


--- trunk/Source/WebKit/ChangeLog	2021-10-06 14:56:33 UTC (rev 283617)
+++ trunk/Source/WebKit/ChangeLog	2021-10-06 15:21:31 UTC (rev 283618)
@@ -1,3 +1,15 @@
+2021-10-06  Chris Dumez  <[email protected]>
+
+        IPC SimpleArgumentEncoder should static_assert(std::is_trivially_copyable<T>)
+        https://bugs.webkit.org/show_bug.cgi?id=230743
+        <rdar://problem/83757335>
+
+        Reviewed by Kimmo Kinnunen.
+
+        Add static_assert(std::is_trivially_copyable<T>) to IPC SimpleArgumentEncoder to avoid misuses.
+
+        * Platform/IPC/ArgumentCoders.h:
+
 2021-10-06  Wenson Hsieh  <[email protected]>
 
         [WebKit2] Refactor some IPC argument encoder logic to work with StreamConnectionEncoder

Modified: trunk/Source/WebKit/Platform/IPC/ArgumentCoders.h (283617 => 283618)


--- trunk/Source/WebKit/Platform/IPC/ArgumentCoders.h	2021-10-06 14:56:33 UTC (rev 283617)
+++ trunk/Source/WebKit/Platform/IPC/ArgumentCoders.h	2021-10-06 15:21:31 UTC (rev 283618)
@@ -43,6 +43,8 @@
 
 // An argument coder works on POD types
 template<typename T> struct SimpleArgumentCoder {
+    static_assert(std::is_trivially_copyable_v<T>);
+
     template<typename Encoder>
     static void encode(Encoder& encoder, const T& t)
     {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to