--- a/browser/components/places/content/editBookmarkOverlay.js
+++ b/browser/components/places/content/editBookmarkOverlay.js
@@ -167,17 +167,17 @@ var gEditItemOverlay = {
this._keyword = existingKeyword;
// Update the text field to the existing keyword.
this._initTextField(this._keywordField, this._keyword);
}
}
}
},
- async _initLoadInSidebar() {
+ _initLoadInSidebar() {
if (!this._paneInfo.isBookmark)
throw new Error("_initLoadInSidebar called unexpectedly");
this._loadInSidebarCheckbox.checked =
PlacesUtils.annotations.itemHasAnnotation(
this._paneInfo.itemId, PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO);
},
@@ -257,19 +257,19 @@ var gEditItemOverlay = {
if (showOrCollapse("keywordRow", isBookmark, "keyword")) {
this._initKeywordField().catch(Components.utils.reportError);
this._keywordField.readOnly = this.readOnly;
}
// Collapse the tag selector if the item does not accept tags.
if (showOrCollapse("tagsRow", isURI || bulkTagging, "tags"))
- this._initTagsField().catch(Components.utils.reportError);
+ this._initTagsField();
else if (!this._element("tagsSelectorRow").collapsed)
- this.toggleTagsSelector().catch(Components.utils.reportError);
+ this.toggleTagsSelector();
// Load in sidebar.
if (showOrCollapse("loadInSidebarCheckbox", isBookmark, "loadInSidebar")) {
this._initLoadInSidebar();
}
// Folder picker.
// Technically we should check that the item is not moveable, but that's
@@ -531,17 +531,17 @@ var gEditItemOverlay = {
// case, since the tagging service may handle those more efficiently.
let lcInputTags = inputTags.map(t => t.toLowerCase());
let removedTags = aCurrentTags.filter(t => !lcInputTags.includes(t.toLowerCase()));
let newTags = inputTags.filter(t => !aCurrentTags.includes(t));
return { removedTags, newTags };
},
// Adds and removes tags for one or more uris.
- async _setTagsFromTagsInputField(aCurrentTags, aURIs) {
+ _setTagsFromTagsInputField(aCurrentTags, aURIs) {
let { removedTags, newTags } = this._getTagsChanges(aCurrentTags);
if (removedTags.length + newTags.length == 0)
return false;
if (!PlacesUIUtils.useAsyncTransactions) {
let txns = [];
for (let uri of aURIs) {
if (removedTags.length > 0)
@@ -577,17 +577,17 @@ var gEditItemOverlay = {
},
async _updateTags() {
let uris = this._paneInfo.bulkTagging ?
this._paneInfo.uris : [this._paneInfo.uri];
let currentTags = this._paneInfo.bulkTagging ?
await this._getCommonTags() :
PlacesUtils.tagging.getTagsForURI(uris[0]);
- let anyChanges = await this._setTagsFromTagsInputField(currentTags, uris);
+ let anyChanges = this._setTagsFromTagsInputField(currentTags, uris);
if (!anyChanges)
return false;
// The panel could have been closed in the meanwhile.
if (!this._paneInfo)
return false;
// Ensure the tagsField is in sync, clean it up from empty tags
@@ -923,17 +923,17 @@ var gEditItemOverlay = {
* @returns an object representing the annotation which could then be used
* with the transaction manager.
*/
_getLastUsedAnnotationObject(aLastUsed) {
return { name: LAST_USED_ANNO,
value: aLastUsed ? new Date().getTime() : null };
},
- async _rebuildTagsSelectorList() {
+ _rebuildTagsSelectorList() {
let tagsSelector = this._element("tagsSelector");
let tagsSelectorRow = this._element("tagsSelectorRow");
if (tagsSelectorRow.collapsed)
return;
// Save the current scroll position and restore it after the rebuild.
let firstIndex = tagsSelector.getIndexOfFirstVisibleRow();
let selectedIndex = tagsSelector.selectedIndex;
@@ -966,26 +966,26 @@ var gEditItemOverlay = {
tagsSelector.scrollToIndex(firstIndex);
if (selectedIndex >= 0 && tagsSelector.itemCount > 0) {
selectedIndex = Math.min(selectedIndex, tagsSelector.itemCount - 1);
tagsSelector.selectedIndex = selectedIndex;
tagsSelector.ensureIndexIsVisible(selectedIndex);
}
},
- async toggleTagsSelector() {
+ toggleTagsSelector() {
var tagsSelector = this._element("tagsSelector");
var tagsSelectorRow = this._element("tagsSelectorRow");
var expander = this._element("tagsSelectorExpander");
if (tagsSelectorRow.collapsed) {
expander.className = "expander-up";
expander.setAttribute("tooltiptext",
expander.getAttribute("tooltiptextup"));
tagsSelectorRow.collapsed = false;
- await this._rebuildTagsSelectorList();
+ this._rebuildTagsSelectorList();
// This is a no-op if we've added the listener.
tagsSelector.addEventListener("CheckboxStateChange", this);
} else {
expander.className = "expander-down";
expander.setAttribute("tooltiptext",
expander.getAttribute("tooltiptextdown"));
tagsSelectorRow.collapsed = true;
@@ -1055,17 +1055,17 @@ var gEditItemOverlay = {
this._updateTags();
break;
case "unload":
this.uninitPanel(false);
break;
}
},
- async _initTagsField() {
+ _initTagsField() {
let tags;
if (this._paneInfo.isURI)
tags = PlacesUtils.tagging.getTagsForURI(this._paneInfo.uri);
else if (this._paneInfo.bulkTagging)
tags = this._getCommonTags();
else
throw new Error("_promiseTagsStr called unexpectedly");
@@ -1094,20 +1094,20 @@ var gEditItemOverlay = {
updateTagsField = true;
delete this._paneInfo._cachedCommonTags;
}
} else {
throw new Error("_onTagsChange called unexpectedly");
}
if (updateTagsField) {
- await this._initTagsField();
+ this._initTagsField();
// Any tags change should be reflected in the tags selector.
if (this._element("tagsSelector")) {
- await this._rebuildTagsSelectorList();
+ this._rebuildTagsSelectorList();
}
}
},
_onItemTitleChange(aItemId, aNewTitle) {
if (!this._paneInfo.isBookmark)
return;
if (aItemId == this._paneInfo.itemId) {