mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1362882 - hand cleanup after applying the previous script-generated patch, r=Mossop.
This commit is contained in:
parent
97f401c644
commit
85e816d9e7
@ -98,11 +98,11 @@ function unlockWidth(aItemIDs) {
|
||||
* @param aIsOverflowed if we're waiting for the item to be overflowed.
|
||||
*/
|
||||
function waitForOverflowed(aItem, aIsOverflowed) {
|
||||
return new Promise(resolve => {
|
||||
if (aItem.overflowed == aIsOverflowed) {
|
||||
return resolve();
|
||||
}
|
||||
if (aItem.overflowed == aIsOverflowed) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return new Promise(resolve => {
|
||||
let observer = new MutationObserver(function(aMutations) {
|
||||
if (aItem.overflowed == aIsOverflowed) {
|
||||
observer.disconnect();
|
||||
@ -110,6 +110,5 @@ function waitForOverflowed(aItem, aIsOverflowed) {
|
||||
}
|
||||
});
|
||||
observer.observe(aItem.node, {attributes: true});
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -113,11 +113,11 @@ function promiseFocus() {
|
||||
}
|
||||
|
||||
function promisePanelOpened() {
|
||||
return new Promise(resolve => {
|
||||
if (DownloadsPanel.panel && DownloadsPanel.panel.state == "open") {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
if (DownloadsPanel.panel && DownloadsPanel.panel.state == "open") {
|
||||
return resolve();
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
|
||||
// Hook to wait until the panel is shown.
|
||||
let originalOnPopupShown = DownloadsPanel.onPopupShown;
|
||||
|
@ -969,7 +969,7 @@ Experiments.Experiments.prototype = {
|
||||
xhr.send(null);
|
||||
} catch (e) {
|
||||
this._log.error("httpGetRequest() - Error opening request to " + url + ": " + e);
|
||||
return Promise.reject(new Error("Experiments - Error opening XHR for " + url));
|
||||
reject(new Error("Experiments - Error opening XHR for " + url));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -533,7 +533,7 @@ this.ContentSearch = {
|
||||
// This throws if the URI is erroneously encoded.
|
||||
xhr.send();
|
||||
} catch (err) {
|
||||
return Promise.resolve(null);
|
||||
resolve(null);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -410,7 +410,7 @@ function arrayBufferFromDataURI(uri) {
|
||||
try {
|
||||
xhr.send();
|
||||
} catch (err) {
|
||||
return Promise.resolve(null);
|
||||
resolve(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user