Closed
Bug 834153
Opened 11 years ago
Closed 11 years ago
Queue CreateAnswer in PC.js
Categories
(Core :: WebRTC: Signaling, defect)
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: ekr, Assigned: abr)
Details
(Whiteboard: [webrtc][blocking-webrtc+][qa-])
Attachments
(2 files, 4 obsolete files)
Currently, PeerConnection.js examines remoteDescription which transitively calls PCImpl::remotedescription createAnswer: function(onSuccess, onError, constraints, provisional) { if (!this.remoteDescription) { throw new Error("setRemoteDescription not called"); } if (this.remoteDescription.type != "offer") { throw new Error("No outstanding offer"); } if (!constraints) { constraints = {}; } ... // TODO: Implement provisional answer. this._queueOrRun({ func: this._pc.createAnswer, args: [constraints], wait: true }); There is a race condition here because SetRemoteDescription is queued pending SIPCC and ICE readiness but the check of this.remoteDescription is not queued. If you lose the aces, then either: (a) the ICE state check in GetRemoteDescription fails (b) An empty string is returned at which point this exception is thrown. Either one causes problems.
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → adam
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [webrtc][blocking-webrtc+]
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #705892 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #705894 -
Flags: review?(ekr)
Reporter | ||
Comment 3•11 years ago
|
||
Comment on attachment 705894 [details] [diff] [review] Queue CreateAnswer State Checks Review of attachment 705894 [details] [diff] [review]: ----------------------------------------------------------------- lgtm but hold off on committing till I hjave tested it in the case that fails.
Attachment #705894 -
Flags: review?(ekr) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #705894 -
Attachment is obsolete: true
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 705919 [details] [diff] [review] Queue CreateAnswer State Checks Rebasing on m-i tip. Carrying forward r+ from ekr
Attachment #705919 -
Flags: review+
Assignee | ||
Comment 6•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #705950 -
Flags: review?(ekr)
Reporter | ||
Comment 7•11 years ago
|
||
Comment on attachment 705950 [details] [diff] [review] Mochi test Review of attachment 705950 [details] [diff] [review]: ----------------------------------------------------------------- lgtm but with proposed nits. ::: dom/media/tests/mochitest/test_peerConnection_bug834153.html @@ +16,5 @@ > +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=834153">Queue CreateAnswer in PeerConnection.js</a> > +<p id="display"></p> > +<pre id="test"> > +<script class="testbody" type="application/javascript"> > +function croak(msg) { Could this be moved into pc.js or some other common code. @@ +29,5 @@ > + ok(pc1, "pc1 is non-null"); > + > + pc1.createOffer( > + function(d) { > + pc2 = new mozRTCPeerConnection(); Shouldn't there be a var somewhere? this is being hoisted into global scope.
Attachment #705950 -
Flags: review?(ekr) → review+
Reporter | ||
Comment 8•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Attachment #705919 -
Attachment is obsolete: true
Reporter | ||
Comment 9•11 years ago
|
||
Comment on attachment 706172 [details] [diff] [review] Queue CreateAnswer State Checks Review of attachment 706172 [details] [diff] [review]: ----------------------------------------------------------------- The problem with Adam's initial patch was that we were cranking executeNext out of non-callback events (e.g.. pc.onaddstream). This means that if you, for instance, call setRemoteDescription() and createAnswer(), then createAnswer() can get invoked on PCImpl out of pc.onaddstream(), which you don't want.
Attachment #706172 -
Flags: review?(rjesup)
Attachment #706172 -
Flags: review?(adam)
Assignee | ||
Comment 10•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #706172 -
Attachment is obsolete: true
Attachment #706172 -
Flags: review?(rjesup)
Attachment #706172 -
Flags: review?(adam)
Assignee | ||
Comment 11•11 years ago
|
||
Comment on attachment 706240 [details] [diff] [review] Queue CreateAnswer State Checks, remove extraneous _executeNext calls This patch removes some additional extraneous calls to _executeNext, on top of the ones EKR already identified as problematic. The changes pass mochi locally, although I haven't formulated any specific test cases to test the kinds of sequencing that would make this problem show up. Given the relative urgency of landing this patch, I'd be inclined to push rigorous sequencing testing off onto another bug.
Attachment #706240 -
Flags: review?(rjesup)
Attachment #706240 -
Flags: review?(ekr)
Reporter | ||
Comment 12•11 years ago
|
||
Comment on attachment 706240 [details] [diff] [review] Queue CreateAnswer State Checks, remove extraneous _executeNext calls Review of attachment 706240 [details] [diff] [review]: ----------------------------------------------------------------- lgtm
Attachment #706240 -
Flags: review?(ekr) → review+
Updated•11 years ago
|
Attachment #706240 -
Flags: review?(rjesup) → review+
Assignee | ||
Comment 13•11 years ago
|
||
Checked in: http://hg.mozilla.org/integration/mozilla-inbound/rev/e4e3590aa1da http://hg.mozilla.org/integration/mozilla-inbound/rev/5a2c4f450e07
Assignee | ||
Updated•11 years ago
|
Attachment #705950 -
Flags: checkin+
Assignee | ||
Updated•11 years ago
|
Attachment #706240 -
Flags: checkin+
Comment 14•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e4e3590aa1da https://hg.mozilla.org/mozilla-central/rev/5a2c4f450e07
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Updated•11 years ago
|
Whiteboard: [webrtc][blocking-webrtc+] → [webrtc][blocking-webrtc+][qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•