Calling addStream on a peer connection object with a stream that already exists in localStreams - should fail gracefully and not throw NS_ERROR_FAILURE

NEW
Unassigned

Status

()

Core
WebRTC
P4
normal
Rank:
35
6 years ago
9 months ago

People

(Reporter: jsmith, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

1.74 KB, application/x-zip-compressed
Details
(Reporter)

Description

6 years ago
Created attachment 696664 [details]
Test Case

Steps:

1. Load the attached test case html file
2. Select "Turn on local video 1 with gum video only"
3. Select "Create Peer Connection 1"
4. Select "Handle onaddstream PC 1"
5. Select "Add User 1 Video Stream to PC 1"
6. Repeat step 5

Expected:

A "friendly" exception should be thrown that is understandable to a developer that they duplicated an existing stream.

Actual:

A NS_ERROR_FAILURE is thrown:

Timestamp: 12/30/2012 8:15:20 PM
Error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [IPeerConnection.addStream]
Source File: resource://gre/components/PeerConnection.js
Line: 278

This is a very unhelpful exception message to a developer. We should really be throwing a "useful" exception here that indicates what and why something failed.
Priority: -- → P3
Whiteboard: [WebRTC], [blocking-webrtc-]
Jason, would you mind to please upload a single file as a testcase? That's way more helpful as all of those zip packages you will have to download and extract before. No checks can be done while having this bug open. You can easily combine the js code into the HTML file. That also applies to all the other testcases you have uploaded recently. Thanks.

Updated

3 years ago
backlog: --- → webRTC+
Rank: 35
Whiteboard: [WebRTC], [blocking-webrtc-]
Mass change P3->P4 to align with new Mozilla triage process.
Priority: P3 → P4
You need to log in before you can comment on or make changes to this bug.