Bug 1068962 - Fix settings lock ownership array splice; r=bent
authorKyle Machulis <kyle@nonpolynomial.com>
Thu, 18 Sep 2014 10:08:36 -0700
changeset 206099 0ad56fef7fb28017906c1ad1d3a18c08ecc20504
parent 206098 2c4c4a88366229614a1291e63110c83891a2e728
child 206100 2d5de8b63f6963154c52791c2023635b234c8dc8
push id27512
push usercbook@mozilla.com
push dateFri, 19 Sep 2014 12:07:02 +0000
treeherdermozilla-central@c8dee1c9cc3d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs1068962
milestone35.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 1068962 - Fix settings lock ownership array splice; r=bent
dom/settings/SettingsManager.js
--- a/dom/settings/SettingsManager.js
+++ b/dom/settings/SettingsManager.js
@@ -259,17 +259,17 @@ SettingsManager.prototype = {
     this._locks.push(lock._id);
     return lock;
   },
 
   unregisterLock: function(aLockID) {
     let lock_index = this._locks.indexOf(aLockID);
     if (lock_index != -1) {
       if (DEBUG) debug("Unregistering lock " + aLockID);
-      this._locks.splice(lock_index, -1);
+      this._locks.splice(lock_index, 1);
     }
   },
   
   receiveMessage: function(aMessage) {
     if (DEBUG) debug("Settings::receiveMessage: " + aMessage.name);
     let msg = aMessage.json;
 
     switch (aMessage.name) {