Bug 1030591 - Send connectionInfoUpdate while IP change. r=vchang
authorChuck Lee <chulee@mozilla.com>
Fri, 27 Jun 2014 17:26:31 +0800
changeset 191894 e2a9e9dcc44ab5622e1c00ce3f664163a1b83722
parent 191893 ae0542323b126cc75b187e3edd02573aa9e94260
child 191895 213b52d04d791fd88436e76bae03300ff3ab16ab
push id45685
push usercbook@mozilla.com
push dateWed, 02 Jul 2014 13:09:48 +0000
treeherdermozilla-inbound@60133a85f8ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvchang
bugs1030591
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1030591 - Send connectionInfoUpdate while IP change. r=vchang
dom/wifi/WifiWorker.js
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -2500,16 +2500,17 @@ WifiWorker.prototype = {
                      ipAddress: self.ipAddress };
         let last = self._lastConnectionInfo;
 
         // Only fire the event if the link speed changed or the signal
         // strength changed by more than 10%.
         function tensPlace(percent) ((percent / 10) | 0)
 
         if (last && last.linkSpeed === info.linkSpeed &&
+            last.ipAddress === info.ipAddress &&
             tensPlace(last.relSignalStrength) === tensPlace(info.relSignalStrength)) {
           return;
         }
 
         self._lastConnectionInfo = info;
         debug("Firing connectionInfoUpdate: " + uneval(info));
         self._fireEvent("connectionInfoUpdate", info);
       });