Bug 220519 - Some type serialization encoders are implemented in Encoder class
Summary: Some type serialization encoders are implemented in Encoder class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks: webglgpup 219641
  Show dependency treegraph
 
Reported: 2021-01-11 11:49 PST by Kimmo Kinnunen
Modified: 2021-01-29 05:03 PST (History)
2 users (show)

See Also:


Attachments
Patch (26.45 KB, patch)
2021-01-11 12:05 PST, Kimmo Kinnunen
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (27.44 KB, patch)
2021-01-11 12:52 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (27.49 KB, patch)
2021-01-27 10:42 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (27.48 KB, patch)
2021-01-27 11:08 PST, Kimmo Kinnunen
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-01-11 11:49:51 PST
Some type encoders are implemented in Encoder class

Most type encoders for IPC serialization are implemented in the type (T::encode(Encoder&)) or in ArgumentCoder<T> template.

However, arithmetic types and enums are implemented in Encoder.

This makes it hard to implement other types of Encoders, since this code should be somehow duplicated or extracted redundantly to a base template.

Instead, it would be consistent if all the serialization would be in in the T::encode or ArgumentCoder<T>::encode.

This would be important for WebGL IPC, where the stream serialization would in general use the base serialization code, but some details of the Encoder would need to differ.
Comment 1 Kimmo Kinnunen 2021-01-11 12:05:57 PST
Created attachment 417398 [details]
Patch
Comment 2 Kimmo Kinnunen 2021-01-11 12:52:10 PST
Created attachment 417404 [details]
Patch
Comment 3 Radar WebKit Bug Importer 2021-01-18 11:50:13 PST
<rdar://problem/73327684>
Comment 4 Chris Dumez 2021-01-26 08:46:54 PST
Comment on attachment 417404 [details]
Patch

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

> Source/WebKit/ChangeLog:15
> +        corresponidng modification to Decoder class for consistency.

typo: corresponidng
Comment 5 Kimmo Kinnunen 2021-01-27 10:42:09 PST
Created attachment 418559 [details]
Patch
Comment 6 Kimmo Kinnunen 2021-01-27 11:08:20 PST
Created attachment 418563 [details]
Patch
Comment 7 EWS 2021-01-29 05:03:16 PST
Committed r272058: <https://trac.webkit.org/changeset/272058>

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