Bug 1327938 - Clear the existing timeout before creating a new one, as we should only have one autoclose timer running at a time. r=mak, a=jcristau
authorJared Wein <jwein@mozilla.com>
Wed, 18 Jan 2017 11:17:10 -0500
changeset 353724 5ec6cfbdd4e1d46903134eff4d4e96655ff6edc8
parent 353723 7585202b140097211e05bebbb39cfcfc7c0c7a8e
child 353725 8b41783ea267fa925414de5e63e03bb34ba7ff73
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, jcristau
bugs1327938
milestone52.0a2
Bug 1327938 - Clear the existing timeout before creating a new one, as we should only have one autoclose timer running at a time. r=mak, a=jcristau MozReview-Commit-ID: 9HdSMGWRvb1
browser/base/content/browser-places.js
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -145,16 +145,17 @@ var StarUI = {
         // auto-close if new and not interacted with
         if (this._isNewBookmark) {
           // 3500ms matches the timeout that Pocket uses in
           // browser/extensions/pocket/content/panels/js/saved.js
           let delay = 3500;
           if (this._closePanelQuickForTesting) {
             delay /= 10;
           }
+          clearTimeout(this._autoCloseTimer);
           this._autoCloseTimer = setTimeout(() => {
             this.panel.hidePopup();
           }, delay);
         }
         break;
     }
   },