Bug 230743 - IPC SimpleArgumentEncoder should static_assert(std::is_trivially_copyable<T>)
Summary: IPC SimpleArgumentEncoder should static_assert(std::is_trivially_copyable<T>)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 230744
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-24 01:47 PDT by Kimmo Kinnunen
Modified: 2021-10-06 08:21 PDT (History)
9 users (show)

See Also:


Attachments
Patch (1.94 KB, patch)
2021-10-05 12:49 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (1.35 KB, patch)
2021-10-06 07:30 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2021-09-24 01:47:53 PDT
IPC SimpleArgumentEncoder should static_assert(std::is_trivially_copyable<T>)
Comment 1 Radar WebKit Bug Importer 2021-10-01 01:48:17 PDT
<rdar://problem/83757335>
Comment 2 Chris Dumez 2021-10-05 12:49:43 PDT
Created attachment 440250 [details]
Patch
Comment 3 Kimmo Kinnunen 2021-10-06 04:16:26 PDT
Comment on attachment 440250 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=440250&action=review

> Source/WebKit/Platform/IPC/ArgumentCoders.h:47
>      template<typename Encoder>

I think you should be able to assert once in the class scope.

template<typename T> struct SimpleArgumentCoder {
    static_assert(std::is_trivially_copyable_v<T>);
    ....
Comment 4 Chris Dumez 2021-10-06 07:30:55 PDT
Created attachment 440364 [details]
Patch
Comment 5 Chris Dumez 2021-10-06 07:31:03 PDT
(In reply to Kimmo Kinnunen from comment #3)
> Comment on attachment 440250 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=440250&action=review
> 
> > Source/WebKit/Platform/IPC/ArgumentCoders.h:47
> >      template<typename Encoder>
> 
> I think you should be able to assert once in the class scope.
> 
> template<typename T> struct SimpleArgumentCoder {
>     static_assert(std::is_trivially_copyable_v<T>);
>     ....

Indeed, fixed.
Comment 6 EWS 2021-10-06 07:32:10 PDT
Kimmo Kinnunen found in /Volumes/Data/worker/Commit-Queue/build/Source/WebKit/ChangeLog does not appear to be a valid reviewer according to contributors.json.
/Volumes/Data/worker/Commit-Queue/build/Source/WebKit/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Comment 7 EWS 2021-10-06 08:21:38 PDT
Committed r283618 (242570@main): <https://commits.webkit.org/242570@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440364 [details].