Bug 1258019 - avoid JS errors on closed windows in ContentWebRTC.jsm, r=felipe.

This commit is contained in:
Florian Quèze
2016-04-05 12:13:45 +02:00
parent b661cf1dc5
commit 09a9545603

View File

@@ -130,6 +130,11 @@ function handleGUMRequest(aSubject, aTopic, aData) {
contentWindow.navigator.mozGetUserMediaDevices(
constraints,
function (devices) {
// If the window has been closed while we were waiting for the list of
// devices, there's nothing to do in the callback anymore.
if (contentWindow.closed)
return;
prompt(contentWindow, aSubject.windowID, aSubject.callID,
constraints, devices, secure);
},