From 488b2b6c47ae8a9c4136e4dfc88821e21795f429 Mon Sep 17 00:00:00 2001 From: Kai-Zhen Li Date: Mon, 21 Apr 2014 11:59:16 +0800 Subject: [PATCH] Bug 998851 - Bind 'this' to callback function. r=vchang --- dom/wifi/WifiWorker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/wifi/WifiWorker.js b/dom/wifi/WifiWorker.js index 8e61455e3ad4..f61e7d6e60ac 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) {