Bug 1733780 [wpt PR 31036] - [WebTransport] Check event type before using its propert...
commit7e92ceeb4748429ac79634c9a921b9152e68b81a
authorYutaka Hirano <yhirano@chromium.org>
Mon, 4 Oct 2021 23:17:47 +0000 (4 23:17 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Tue, 5 Oct 2021 12:49:04 +0000 (5 12:49 +0000)
tree7da36023f69b1bb0c00979c061b4a60f9f5a5f43
parent732bae04f06d64dd608de6565e810ca075af6b47
Bug 1733780 [wpt PR 31036] - [WebTransport] Check event type before using its properties, a=testonly

Automatic update from web-platform-tests
[WebTransport] Check event type before using its properties (#31036)

The below code is problematic

  if self._session_stream_id == event.stream_id and\
    isinstance(event, WebTransportStreamDataReceived):

because it uses event's property before checking its type. This
leads to errors when event without stream_id comes here. This
change fixes that.
--

wpt-commits: a302497d29159081c52e6d8e6b0b4e2a0862e9f2
wpt-pr: 31036
testing/web-platform/tests/tools/webtransport/h3/webtransport_h3_server.py