Closed Bug 1480525 Opened 6 years ago Closed 6 years ago

_localIdp and _remoteIdp are not checked before closed in PeerConnection.js

Categories

(Core :: WebRTC, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: ng, Assigned: ng)

Details

Attachments

(1 file)

_localIdp and _remoteIdp may not exist, when this happens close() will throw an exception and terminate early[0].
Fixing this will fix some exceptions being thrown in the tests, though they are not causing the tests to fail AFAIK.

[0] https://searchfox.org/mozilla-central/source/dom/media/PeerConnection.js#1378
This happens in the test for bug 1227781, in which the PeerConnection initialization is supposed to fail.
If PeerConnection initialization terminates early due to an excpetion localIdp, and remoteIdp aren't created.
This causes another exception in close(). The patch checks that they each exist in close before attempting to 
access them.
Comment on attachment 8997187 [details]
Bug 1480525 - ensure localIdp, remoteIdp exist before closing them

Michael Froman [:mjf] has approved the revision.

https://phabricator.services.mozilla.com/D2686
Attachment #8997187 - Flags: review+
Priority: -- → P2
Pushed by na-g@nostrum.com:
https://hg.mozilla.org/integration/autoland/rev/5b36bf1368f6
ensure localIdp, remoteIdp exist before closing them r=mjf
https://hg.mozilla.org/mozilla-central/rev/5b36bf1368f6
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: