Bug 777904 - Fix typo. Also handle an error case better. r=gal DONTBUILD

This commit is contained in:
Blake Kaplan 2012-07-31 14:27:46 -07:00
parent 025565f8f7
commit d24e63f347
2 changed files with 7 additions and 2 deletions

View File

@ -287,10 +287,10 @@ DOMWifiManager.prototype = {
network: this._currentNetwork });
},
get connectionInfo() {
get connectionInformation() {
if (!this._hasPrivileges)
throw new Components.Exception("Denied", Cr.NS_ERROR_FAILURE);
return this._lastConnectionInfo;
return exposeReadOnly(this._lastConnectionInfo);
},
set onstatuschange(callback) {

View File

@ -1652,6 +1652,11 @@ WifiWorker.prototype = {
function getConnectionInformation() {
WifiManager.getConnectionInfo(function(info) {
// See comments in calculateSignal for information about this.
if (!info) {
self._lastConnectionInfo = null;
return;
}
let { rssi, linkspeed } = info;
if (rssi > 0)
rssi -= 256;