Open Bug 1917416 Opened 1 year ago Updated 10 months ago

Uncaught DOMException from top-level await reveals Firefox stack in web console

Categories

(Core :: DOM: Bindings (WebIDL), defect)

defect

Tracking

()

People

(Reporter: jib, Unassigned, NeedInfo)

Details

Attachments

(3 files)

STR: Open web console on repro attachment

Expected result:

Uncaught (in promise) DOMException: Invalid description, no ice-ufrag attribute at level 0
    <anonymous> https://bug1917416.bmoattachments.org/attachment.cgi?id=9423376:9
attachment.cgi:9

Actual result:

Uncaught DOMException: Invalid description, no ice-ufrag attribute at level 0
    <anonymous> https://bug1917416.bmoattachments.org/attachment.cgi?id=9423376:9
attachment.cgi:9
    newError resource://gre/modules/media/PeerConnection.sys.mjs:1903
    onSetDescriptionError resource://gre/modules/media/PeerConnection.sys.mjs:1931
    _setLocalDescription resource://gre/modules/media/PeerConnection.sys.mjs:1216
    _setLocalDescription resource://gre/modules/media/PeerConnection.sys.mjs:1213
    _chain resource://gre/modules/media/PeerConnection.sys.mjs:689
    _setLocalDescription resource://gre/modules/media/PeerConnection.sys.mjs:1183
    setLocalDescription resource://gre/modules/media/PeerConnection.sys.mjs:1172
    _closeWrapper resource://gre/modules/media/PeerConnection.sys.mjs:719
    _async resource://gre/modules/media/PeerConnection.sys.mjs:703
    _auto resource://gre/modules/media/PeerConnection.sys.mjs:713
    setLocalDescription resource://gre/modules/media/PeerConnection.sys.mjs:1172
    <anonymous> https://bug1917416.bmoattachments.org/attachment.cgi?id=9423376:9
    AsyncFunctionNext self-hosted:807

I guess this shows up only when devtools are open, since async stacks are enabled only in that case (https://bugzilla.mozilla.org/show_bug.cgi?id=1601179).
I wonder if bindings should somehow scope the async stacks.

(But we should get rid of JS implemented webidl ;) )

Component: DOM: Core & HTML → DOM: Bindings (WebIDL)
Flags: needinfo?(peterv)

Might be possible to do something in CallSetup::CallSetup if aIsJSImplementedWebIDL == true, we already do something about async stacks there (https://searchfox.org/mozilla-central/rev/5c2888b35d56928d252acf84e8816fa89a8a6a61/dom/bindings/CallbackObject.cpp#302-305)

Flags: needinfo?(peterv)

Olli, do you have an idea of how hard Peter's suggestion would be to implement?

Severity: -- → S3
Flags: needinfo?(smaug)

Or maybe you know Edgar ?

Flags: needinfo?(echen)

Depends on the behavior we want. Should we disable async stacks when there is JS implemented JS around?
Anyhow, this doesn't feel too tricky. Someone should play with the relevant code a bit.

Flags: needinfo?(smaug)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: