Bug 998851 - Bind 'this' to callback function. r=vchang

This commit is contained in:
Kai-Zhen Li 2014-04-21 11:59:16 +08:00
parent 7aac1fff44
commit dbf41ef2d5

View File

@ -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) {