Bug 220916 - Synchronous messages cannot be answered with different type of encoder
Summary: Synchronous messages cannot be answered with different type of encoder
Status: RESOLVED INVALID
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:
 
Reported: 2021-01-25 04:27 PST by Kimmo Kinnunen
Modified: 2021-02-25 04:06 PST (History)
7 users (show)

See Also:


Attachments
Patch (192.74 KB, patch)
2021-01-25 04:52 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (127.57 KB, patch)
2021-01-25 04:57 PST, Kimmo Kinnunen
ews-feeder: commit-queue-
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-25 04:27:35 PST
Synchronous messages cannot be answered with different type of encoder

Current generated message handler has a special case for async messages and a special case for synchronous messages.
The synchronous messages message handler signature is (Connection& connection, Decoder& decoder, Encoder& replyEncoder).

This is inconvenient for planned WebGL IPC "stream" feature.
In the "stream" use-case, most of the sync messages would come in the same way as async messages, via SHM memory buffer.
The reply should go to the SHM memory buffer too, with the help of stream-specific encoder.
Since the stream-specific encoder is not IPC::Encoder, current generated message handlers cannot support this.

A solution could be to move the sync reply id to the end of the message payload, so that the message handling of async and sync messages can be unified.
Comment 1 Kimmo Kinnunen 2021-01-25 04:52:38 PST
Created attachment 418276 [details]
Patch
Comment 2 Kimmo Kinnunen 2021-01-25 04:57:53 PST
Created attachment 418278 [details]
Patch
Comment 3 Radar WebKit Bug Importer 2021-02-01 04:28:13 PST
<rdar://problem/73825012>
Comment 4 Kimmo Kinnunen 2021-02-25 04:03:23 PST
This is probably not needed. Currently the handleMessage function can dig out the sync reply id for the streams.

Marking this as not blocking webglgpup and configuration changed.