Bug 1136434 - RequestSync API should delete all the timers when a task is unregistered, r=ehsan
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 03 Mar 2015 11:07:26 +0000
changeset 261890 3f5ec730b1db907cf4d0ef80f25f054d45b190e1
parent 261889 12b808411eda6e16016f1cb9af6cf5ccc2238833
child 261891 133ec7304f2208e89f02ed943480a1b1f02188c9
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1136434
milestone39.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 1136434 - RequestSync API should delete all the timers when a task is unregistered, r=ehsan
dom/requestsync/RequestSyncService.jsm
--- a/dom/requestsync/RequestSyncService.jsm
+++ b/dom/requestsync/RequestSyncService.jsm
@@ -244,19 +244,18 @@ this.RequestSyncService = {
     this.removeRegistrationInternal(aTaskName, aKey);
     return true;
   },
 
   removeRegistrationInternal: function(aTaskName, aKey) {
     debug('removeRegistrationInternal');
 
     let obj = this._registrations[aKey][aTaskName];
-    if (obj.timer) {
-      obj.timer.cancel();
-    }
+
+    this.removeTimer(obj);
 
     // It can be that this task has been already schedulated.
     this.removeTaskFromQueue(obj);
 
     // It can be that this object is already in scheduled, or in the queue of a
     // iDB transacation. In order to avoid rescheduling it, we must disable it.
     obj.active = false;