зеркало из https://github.com/mozilla/gecko-dev.git
Bug 815110 - Change DOMWifiManager so it returns null instead of creating the object if the caller doesn't have the correct permission. r=mrbkap
This commit is contained in:
Родитель
0a7c511353
Коммит
7b97c475f4
|
@ -69,6 +69,10 @@ DOMWifiManager.prototype = {
|
|||
// Only pages with perm set can use the wifi manager.
|
||||
this._hasPrivileges = perm == Ci.nsIPermissionManager.ALLOW_ACTION;
|
||||
|
||||
if (!this._hasPrivileges) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Maintain this state for synchronous APIs.
|
||||
this._currentNetwork = null;
|
||||
this._connectionStatus = "disconnected";
|
||||
|
|
Загрузка…
Ссылка в новой задаче