WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
310157
[Inspector] Protocol C++ generator should support nullable event parameters
https://bugs.webkit.org/show_bug.cgi?id=310157
Summary
[Inspector] Protocol C++ generator should support nullable event parameters
juliopiubellow
Reported
2026-03-17 21:55:26 PDT
The shared inspector protocol C++ generator currently does not preserve "nullable": true on event parameters, even though nullable object members are already modeled correctly. That forces callers to hand-craft JSON envelopes for events whose parameters may be explicitly null, which defeats the purpose of the generated protocol types and weakens type guarantees. Add shared support for nullable event parameters so generated frontend dispatchers can accept typed nullable values and serialize them as either the expected protocol type or JSON null. While implementing WebDriver BiDi browsing-context events, we ran into a gap in the shared inspector codegen: event parameters currently preserve optional, but they do not preserve nullable. As a result, generated event notifier signatures can express only a required typed value or an omitted value for optional parameters, but not an explicit null value required by the protocol. This is why nullable object members work today, but nullable event parameters do not. The intended direction is to add shared nullable-event-parameter support to the inspector protocol model and C++ generator, likely by introducing a concrete JSON null type and a typed nullable wrapper for generated protocol C++ so that non-null values are still forced to be the expected type. This should land as separate shared infrastructure work before the WebDriver BiDi PR that wants to rely on it.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-03-24 21:56:12 PDT
<
rdar://problem/173295523
>
Blaze Burg
Comment 2
2026-03-31 14:59:32 PDT
https://github.com/WebKit/WebKit/pull/60920
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug