Bug 1471580 - Remove unused _bookmarkPopupInitialized flag. r?standard8 draft
authorDão Gottwald <dao@mozilla.com>
Wed, 27 Jun 2018 14:57:16 +0200
changeset 811326 e038a0a00fb8ef6933560c55f16e357c3c33e444
parent 811302 9c7bb8874337c2d40aef3d9945b10490a5115188
child 811329 821e929d4d9540cec170aa33c26dd06c7691b5a9
push id114264
push userdgottwald@mozilla.com
push dateWed, 27 Jun 2018 12:58:21 +0000
reviewersstandard8
bugs1471580
milestone63.0a1
Bug 1471580 - Remove unused _bookmarkPopupInitialized flag. r?standard8 MozReview-Commit-ID: LI7oXGLDyso
browser/base/content/browser-places.js
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -210,41 +210,26 @@ var StarUI = {
             }
           }, delay);
           this._autoCloseTimerEnabled = true;
         }
         break;
     }
   },
 
-  _bookmarkPopupInitialized: false,
   async showEditBookmarkPopup(aNode, aAnchorElement, aPosition, aIsNewBookmark, aUrl, aIsCurrentBrowser = true) {
     // Slow double-clicks (not true double-clicks) shouldn't
     // cause the panel to flicker.
-    if (this.panel.state == "showing" ||
-        this.panel.state == "open") {
+    if (this.panel.state != "closed") {
       return;
     }
 
     this._isNewBookmark = aIsNewBookmark;
     this._itemGuids = null;
 
-    if (this._bookmarkPopupInitialized) {
-      await this._doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition, aUrl, aIsCurrentBrowser);
-      return;
-    }
-    this._bookmarkPopupInitialized = true;
-
-    await this._doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition, aUrl, aIsCurrentBrowser);
-  },
-
-  async _doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition, aUrl, aIsCurrentBrowser) {
-    if (this.panel.state != "closed")
-      return;
-
     this._blockCommands(); // un-done in the popuphidden handler
 
     this._element("editBookmarkPanelTitle").value =
       this._isNewBookmark ?
         gNavigatorBundle.getString("editBookmarkPanel.newBookmarkTitle") :
         gNavigatorBundle.getString("editBookmarkPanel.editBookmarkTitle");
 
     // No description; show the Done, Remove;