зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1307491 - (Part 4) Remove support for per-app-offline in PeerConnection.js [nukeb2g] r=jesup
MozReview-Commit-ID: LdLx3bMG9Tx --HG-- extra : rebase_source : a2d3d44970d17ef6f679adeed4f043c99b250744
This commit is contained in:
Родитель
02543ae9c1
Коммит
8e9054d0b7
|
@ -190,19 +190,6 @@ GlobalPCList.prototype = {
|
||||||
} else if (data == "online") {
|
} else if (data == "online") {
|
||||||
this._networkdown = false;
|
this._networkdown = false;
|
||||||
}
|
}
|
||||||
} else if (topic == "network:app-offline-status-changed") {
|
|
||||||
// App changed offline status. The subject contains the appId for which
|
|
||||||
// we need to check the status
|
|
||||||
let appId = subject.QueryInterface(Ci.nsIAppOfflineInfo).appId;
|
|
||||||
let ios = Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService);
|
|
||||||
for (let winId in this._list) {
|
|
||||||
if (appId != this._list[winId]._appId) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (ios.isAppOffline(appId)) {
|
|
||||||
cleanupWinId(this._list, winId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (topic == "gmp-plugin-crash") {
|
} else if (topic == "gmp-plugin-crash") {
|
||||||
if (subject instanceof Ci.nsIWritablePropertyBag2) {
|
if (subject instanceof Ci.nsIWritablePropertyBag2) {
|
||||||
let pluginID = subject.getPropertyAsUint32("pluginID");
|
let pluginID = subject.getPropertyAsUint32("pluginID");
|
||||||
|
@ -384,20 +371,10 @@ RTCPeerConnection.prototype = {
|
||||||
this._mustValidateRTCConfiguration(rtcConfig,
|
this._mustValidateRTCConfiguration(rtcConfig,
|
||||||
"RTCPeerConnection constructor passed invalid RTCConfiguration");
|
"RTCPeerConnection constructor passed invalid RTCConfiguration");
|
||||||
}
|
}
|
||||||
// Save the appId
|
|
||||||
var principal = Cu.getWebIDLCallerPrincipal();
|
var principal = Cu.getWebIDLCallerPrincipal();
|
||||||
this._appId = principal.appId;
|
|
||||||
this._isChrome = Services.scriptSecurityManager.isSystemPrincipal(principal);
|
this._isChrome = Services.scriptSecurityManager.isSystemPrincipal(principal);
|
||||||
|
|
||||||
// Get the offline status for this appId
|
if (_globalPCList._networkdown) {
|
||||||
let appOffline = false;
|
|
||||||
if (this._appId != Ci.nsIScriptSecurityManager.NO_APP_ID &&
|
|
||||||
this._appId != Ci.nsIScriptSecurityManager.UNKNOWN_APP_ID) {
|
|
||||||
let ios = Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService);
|
|
||||||
appOffline = ios.isAppOffline(this._appId);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_globalPCList._networkdown || appOffline) {
|
|
||||||
throw new this._win.DOMException(
|
throw new this._win.DOMException(
|
||||||
"Can't create RTCPeerConnections when the network is down",
|
"Can't create RTCPeerConnections when the network is down",
|
||||||
"InvalidStateError");
|
"InvalidStateError");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче