diff --git a/dom/wifi/WifiWorker.js b/dom/wifi/WifiWorker.js index 8e61455e3ad..f61e7d6e60a 100644 --- a/dom/wifi/WifiWorker.js +++ b/dom/wifi/WifiWorker.js @@ -2641,7 +2641,7 @@ WifiWorker.prototype = { self.waitForScan(waitForScanCallback); doScan(); function doScan() { - WifiManager.scan(true, function (ok) { + WifiManager.scan(true, (function (ok) { if (!ok) { if (!timer) { count = 0; @@ -2659,7 +2659,7 @@ WifiWorker.prototype = { timer.initWithCallback(doScan, 10000, Ci.nsITimer.TYPE_ONE_SHOT); return; } - }); + }).bind(this)); } function waitForScanCallback(networks) {