Closed Bug 1111897 Opened 11 years ago Closed 7 years ago

[EME] promise rejection should log JS line number to WebConsole

Categories

(Core :: Audio/Video: Playback, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: cpearce, Unassigned)

References

Details

When debugging a partner page, some of the promise rejections were logged to the webconsole, but the line number in the JS file was, despite that, the line number was logged to stdout, so this must be possible somehow.
cpearce: is this bug specific to MediaPromises? If this is a problem with all Promises, we could delegate this bug to the JS or DevTools team.
Flags: needinfo?(cpearce)
cpeterson: No, I'm not referring to mozilla::MediaPromise, I'm referring to what happens when our C++ code rejects a dom::Promise held by JS; the if C++ rejects with a DOMError, that error gets logged to the JSConsole, but it would be handy if we could also get the line number of the calling site when rejection that failed. For example, say script calls navigator.requestMediaKeySystemAccess() which returns a promise, and then sometime later the C++ code rejects the promise, it would be good if the line number that called navigator.requestMediaKeySystemAccess() could be logged to the webconsole, so that webdevs know immediately which call failed. It's logged to stdout already in debug builds. So yes, this could be delegated to some other team. As a separate matter, we should change our JS-facing EME code to also log to the webconsole whenever it rejects a promise as to why it's being rejected. I basically suggested this in bug 1074017 comment 0.
Flags: needinfo?(cpearce)
Component: Audio/Video → Audio/Video: Playback
Mass closing do to inactivity. Feel free to re-open if still needed.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.