WebTransport.exportKeyingMaterial() rejects when called before the session is ready
Categories
(Core :: DOM: Networking, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: jesup, Assigned: jesup)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 external file)
Calling exportKeyingMaterial() on a WebTransport while its state is still "connecting" rejects with an InvalidStateError ("Failed to export keying material") instead of resolving once the session is established.
The spec (https://w3c.github.io/webtransport/#dom-webtransport-exportkeyingmaterial) only rejects synchronously when [[State]] is "closed" or "failed"; otherwise the export runs in parallel and resolves p with the keying material, aborting with an InvalidStateError only if the state becomes "closed" or "failed".
WebTransport::ExportKeyingMaterial() sends the IPC request immediately, but WebTransportParent::RecvExportKeyingMaterial() can only export once the session exists, so during "connecting" it resolves with Nothing() and the content process rejects.
This fails the WPT subtest "exportKeyingMaterial can be called while connecting" in all four variants of webtransport/export-keying-material.https.any.js (currently marked expected: FAIL). Test dashboard: https://tests.firefox.dev/test.html?test=testing/web-platform/tests/webtransport/export-keying-material.https.any.js
Fix: while "connecting", defer the request until [[Ready]] settles, as getStats() already does, and reject with an InvalidStateError if connecting fails.
| Assignee | ||
Comment 1•9 days ago
|
||
The parent can only export keying material once the session is
established, so a call made while the state was "connecting" was
rejected. Defer the request until [[Ready]] settles, as getStats()
already does, and reject with an InvalidStateError if connecting fails.
Updated•9 days ago
|
Comment 5•4 days ago
|
||
| bugherder | ||
Description
•