Bug 1820979 - Remove instant apply bookmarks panels code r=mak
Remove the `browser.bookmarks.editDialog.delayedApply.enabled` pref, and for all usages in conditional branches, assume that it is `true`. (Since we want to be using delayed apply logic going forward.) `delayed_apply` spinoffs of tests are removed and merged with their instant apply counterparts. The only test removed without a corresponding spinoff is `browser_editBookmark_tags_liveUpdate.js`. That test is checking whether tags are updated in the edit dialog, if they are updated from a different place. The problem is that we don't really want this behavior anymore. It was previously set to only run with `browser.bookmarks.editDialog.delayedApply.enabled` set to `false`, but now that it's no longer configurable, it made most sense to simply get rid of this test. https://treeherder.mozilla.org/jobs?revision=c0741eca62212a75a9dd52fc2c5c2b6c34f9f2d7&repo=try Differential Revision: https://phabricator.services.mozilla.com/D176370
This commit is contained in:
@@ -567,49 +567,6 @@ export var PlacesUIUtils = {
|
||||
let features = "centerscreen,chrome,modal,resizable=no";
|
||||
let bookmarkGuid;
|
||||
|
||||
if (
|
||||
!Services.prefs.getBoolPref(
|
||||
"browser.bookmarks.editDialog.delayedApply.enabled",
|
||||
false
|
||||
)
|
||||
) {
|
||||
// Set the transaction manager into batching mode.
|
||||
let topUndoEntry = lazy.PlacesTransactions.topUndoEntry;
|
||||
let batchBlockingDeferred = lazy.PromiseUtils.defer();
|
||||
let batchCompletePromise = lazy.PlacesTransactions.batch(async () => {
|
||||
await batchBlockingDeferred.promise;
|
||||
});
|
||||
|
||||
if (!aParentWindow) {
|
||||
aParentWindow = Services.wm.getMostRecentWindow(null);
|
||||
}
|
||||
|
||||
if (aParentWindow.gDialogBox) {
|
||||
await aParentWindow.gDialogBox.open(dialogURL, aInfo);
|
||||
} else {
|
||||
aParentWindow.openDialog(dialogURL, "", features, aInfo);
|
||||
}
|
||||
|
||||
bookmarkGuid =
|
||||
("bookmarkGuid" in aInfo && aInfo.bookmarkGuid) || undefined;
|
||||
|
||||
batchBlockingDeferred.resolve();
|
||||
|
||||
// Ensure the batch has completed before we start the undo/resolve
|
||||
// the deferred promise.
|
||||
await batchCompletePromise.catch(console.error);
|
||||
|
||||
if (
|
||||
!bookmarkGuid &&
|
||||
topUndoEntry != lazy.PlacesTransactions.topUndoEntry
|
||||
) {
|
||||
await lazy.PlacesTransactions.undo().catch(console.error);
|
||||
}
|
||||
|
||||
this.lastBookmarkDialogDeferred.resolve(bookmarkGuid);
|
||||
return bookmarkGuid;
|
||||
}
|
||||
|
||||
if (!aParentWindow) {
|
||||
aParentWindow = Services.wm.getMostRecentWindow(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user