Closed Bug 1111679 Opened 5 years ago Closed 5 years ago

Exception in Promise-returning JSImplemented method never makes it out to rejection callback


(Core :: DOM: Core & HTML, defect)

Not set





(Reporter: jib, Unassigned)




1. Click URL.

Expected result:

- In JSFiddle output window: NotSupportedError: pranswer not yet implemented line 30

Actual result:

- In JSFiddle output window: nothing
- In Browser console after 16 seconds: NotSupportedError: pranswer not yet implemented   show:30:0

- Modifying PeerConnection.js to throw inside a promise constructor or .then() functon seems to work, as the problem seems to only manifest when exceptions are caught by the JSImpl wrapper.

This bug seems different from Bug 1107592 mostly in that the method in question is promise-returning.
See Also: → 1107592
Version: 34 Branch → Trunk
Please retest on top of the patches in bug 1107953 (and hence also bug 1107592).  I'm pretty sure that part 3 of bug 1107953 contains changes that fix this, not least because without those the tests I wrote for that bug failed.  ;)
Depends on: 1107953
I have all those patches locally plus my DOMException-using patch in Bug 1111666 and this bug still happens for me locally. I've put up a try in Bug 1111666 comment 2 that should show it.
OK.  Well, I just tried this testcase, with my patches.

What I see is that setLocalDescription returns a promise (as expected), and this promise is rejected with the appropriate Error, also as expected (though I bet you want to throw a DOMException here, on top of my patches, not a DOMError; I didn't test what happens when you do that, because I bet it's the same thing).

The error callback passed to setLocalDescription is of course not called, since the "this.thenCB(p, onSuccess, onError)" line is never reached.

So as far as I can tell the behavior is correct given the code in setLocalDescription.  Why were you expecting some other behavior?
Ugh, that was embarrassing. Not sure what I was thinking there. Sorry to bother you! :*)
Closed: 5 years ago
Resolution: --- → INVALID
No longer blocks: 1111666
It's no bother.  I really appreciate you filing these bugs; it's gotten us to fix a whole bunch of problems in the JS-impl setup!
No longer depends on: 1107953
Issue - I still see this error in the js console:"NotSupportedError: pranswer not yet implemented";when i use the pranswer; I try Firefox 41 and Firefox Nightly; They both failed.
That has nothing to do with this bug.
New user, I think you want Bug 1004510.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.