Closed Bug 825560 Opened 12 years ago Closed 11 years ago

Creating a PeerConnection object and immediately checking the ready state - value is undefined, but should be "new"

Categories

(Core :: WebRTC, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla22

People

(Reporter: jsmith, Assigned: snandaku)

Details

(Keywords: testcase, Whiteboard: [WebRTC][blocking-webrtc-][spec-issue])

Attachments

(3 files)

Attached file Test Case
Steps:

1. Load the attached test case html file
2. Create Peer Connection 1
3. Output the peer connection attributes

Expected:

The readyState should be new.

Actual:

The readyState is undefined.
Flags: in-testsuite?
Keywords: testcase
Assignee: nobody → rjesup
Priority: -- → P2
Whiteboard: [WebRTC], [blocking-webrtc+]
I also met this issue on 22 nightly. It has been solved?
Assignee: rjesup → jib
Assignee: jib → snandaku
QA Contact: jsmith → snandaku
jib .. taking a stab with a patch for this. please let me know if i take this bug for now.
Whiteboard: [WebRTC], [blocking-webrtc+] → [WebRTC][blocking-webrtc-][spec-issue]
This patch allows appropriate reporting of readyState on the PeerConnection object. 

Also the WebRTC Spec has inconsistent definition of readyState as of today. But chrome seems to support it in the latest canary and this patch surfaces similar information to JS API for Firefox.
Attachment #730314 - Flags: review?(rjesup)
Attachment #730314 - Flags: review?(jib)
Comment on attachment 730314 [details] [diff] [review]
Supports readyState reporting on PeerConnection

Review of attachment 730314 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/media/PeerConnection.js
@@ +685,5 @@
> +        break;
> +      case Ci.IPeerConnection.kClosed:
> +        state = "closed"; 
> +        break;
> +    }   

delete-trailing-whitespace
(on a bunch of lines)
Attachment #730314 - Flags: review?(rjesup) → review+
Taking r+ from jesup. If jib thinks this looks fine, we can check this in.
Attachment #730314 - Attachment is obsolete: true
Attachment #730314 - Flags: review?(jib)
Attachment #730431 - Flags: checkin?(rjesup)
Flags: needinfo?(jib)
Attachment #730431 - Attachment is patch: true
Attachment #730431 - Flags: checkin?(rjesup)
Comment on attachment 730314 [details] [diff] [review]
Supports readyState reporting on PeerConnection

Review of attachment 730314 [details] [diff] [review]:
-----------------------------------------------------------------

Yay, my first review! :-)

I was wondering, could the Test Case you attached be reworked to a mochitest? Something along the lines of dom/media/tests/mochitest/test_peerConnection_bug825703.html ? Just a suggestion.

r+ with whitespace nits and IDL enum reuse in PeerConnectionImpl.cpp.

::: dom/media/bridge/IPeerConnection.idl
@@ +88,5 @@
> +  const long kNew = 0;
> +  const long kNegotiating = 1;
> +  const long kActive = 2;
> +  const long kClosing = 3;
> +  const long kClosed = 4;

It took me a moment to realize we have these enums in two places. Now that they're here, can we please reuse them in PeerConnectionImpl.h to avoid bugs? XPIDL generates anonymous enums unfortunately, but the following should work without loosing type-safety:

  enum ReadyState {
    kNew = IPeerConnection::kNew,
    ...
Attachment #730314 - Attachment is obsolete: false
Flags: needinfo?(jib)
Hi, if the fix is checked in, do I just update my firefox nightly on the version 22.0a1 to get fixed version?
And does it is related to the bug 825560 (https://bugzilla.mozilla.org/show_bug.cgi?id=825560)? Is there anyone to look at this issue?
Thanks
george: You need to wait until it a) gets "uplifted" from mozilla-inbound to mozilla-central, then b)_ wait for it to get into a daily build.  If it uplifts before roughly midnight eastern US time, perhaps a couple of hours later, it will be in the nightly build the next day.
https://hg.mozilla.org/mozilla-central/rev/627021947bfd
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Keywords: verifyme
QA Contact: snandaku → jsmith
Followup bug is bug 859432. Also, see bug 857894 as well.
Status: RESOLVED → VERIFIED
Depends on: 859432
Keywords: verifyme
No longer depends on: 859432
Hi, now I am on the latest nightly 23.0a1. I suppose my firefox should include this fix, right?
(In reply to george from comment #14)
> Hi, now I am on the latest nightly 23.0a1. I suppose my firefox should
> include this fix, right?

Yes.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: