Bug 974580 - _timer shouldn't be null. r=allstars.chh
authorHsin-Yi Tsai <htsai@mozilla.com>
Fri, 21 Feb 2014 14:15:35 +0800
changeset 170579 9acc975f26b05281f27e1f8dabf9702f4a0db979
parent 170523 12124be1947e7781ccfeddf57b69f13fc7ffc675
child 170580 66c2b32788a4ee306262e3d06d0dc7700bfc0ffc
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersallstars
bugs974580
milestone30.0a1
Bug 974580 - _timer shouldn't be null. r=allstars.chh
dom/system/gonk/RadioInterfaceLayer.js
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -681,17 +681,17 @@ XPCOMUtils.defineLazyGetter(this, "gRadi
         let deferred = _deactivatingDeferred[clientId] = Promise.defer();
         let dataConnectionHandler = gDataConnectionManager.getConnectionHandler(clientId);
         dataConnectionHandler.deactivateDataCalls();
         return deferred.promise;
       };
     },
 
     _createTimer: function() {
-      if (_timer) {
+      if (!_timer) {
         _timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
       }
       _timer.initWithCallback(this._executeRequest.bind(this),
                               RADIO_POWER_OFF_TIMEOUT,
                               Ci.nsITimer.TYPE_ONE_SHOT);
     },
 
     _cancelTimer: function() {