Closed
Bug 923010
Opened 12 years ago
Closed 12 years ago
no file or line number for exceptions from JS-implemented webidl object
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: jib, Assigned: bzbarsky)
References
Details
(Whiteboard: [WebRTC])
Attachments
(1 file)
As a followup to bug 905392, it would be great if we could see file and line number in web console for error messages thrown by JS-implemented webidl objects.
The file and line number should point to the JS content call site, not chrome.
Example:
Right now, users see thrown WebRTC API-errors in web console like this:
Error: createAnswer passed invalid constraints - unsupported mandatory
constraint: OfferToReceiveAudio
with no link to where this createAnswer is called from. If file and line number were provided, they could click the link to get to their source to see the problem.
![]() |
Assignee | |
Comment 1•12 years ago
|
||
Jan-Ivar, could you attach a testcase that shows the problem, please, so I can debug what's going on here? I would have expected this to work already, and assumed it did given the patch in bug 905392.
![]() |
Assignee | |
Comment 2•12 years ago
|
||
Ah, I guess this shows it:
var conn = new mozRTCPeerConnection();
conn.createAnswer(function() {}, null, { "mandatory": { "BOGUS": 5 } } )
![]() |
Assignee | |
Comment 3•12 years ago
|
||
Attachment #813112 -
Flags: review?(peterv)
![]() |
Assignee | |
Updated•12 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
![]() |
Assignee | |
Updated•12 years ago
|
Whiteboard: [WebRTC] → [need review][WebRTC]
Reporter | ||
Comment 4•12 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #2)
> Ah, I guess this shows it:
Yes, or (from bug 903741 comment 3):
> var pc = new mozRTCPeerConnection({ iceServers: [{ url:"html:x.net" }]}, {});
> I would have expected this to work already, and assumed it did given the patch in bug 905392.
Looks like it got lost, as I see no file or line number in 25, 26 or Nightly.
![]() |
Assignee | |
Comment 5•12 years ago
|
||
Yeah, the JS engine error-reporting APIs are full of fail. :(
Comment 6•12 years ago
|
||
Comment on attachment 813112 [details] [diff] [review]
When rethrowing exceptions from JS-implemented components to content script, make sure to give them a useful filename and line number, pointing to the content script location that triggered the exception.
Review of attachment 813112 [details] [diff] [review]:
-----------------------------------------------------------------
Weird, I remember doing something like this but I don't see it in the patches :-/.
Attachment #813112 -
Flags: review?(peterv) → review+
![]() |
Assignee | |
Comment 7•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b7c5cd333e9c with a test tweak to deal with b2g not doing webrtc, apparently.
Whiteboard: [need review][WebRTC] → [WebRTC]
Target Milestone: --- → mozilla27
Comment 8•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•