зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1528140 - Wait for requests to settle after aboutdebugging tab is selected;r=daisuke
We should wait until the selected tab has been updated because we fetch tabs when the selected index changes. Differential Revision: https://phabricator.services.mozilla.com/D19959 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
79fdd8bd67
Коммит
6c3d75cad6
|
@ -91,11 +91,14 @@ async function openAboutDevtoolsToolbox(doc, tab, win) {
|
|||
}
|
||||
|
||||
async function closeAboutDevtoolsToolbox(devtoolsTab, win) {
|
||||
info("Close about:devtools-toolbox page");
|
||||
const onToolboxDestroyed = gDevTools.once("toolbox-destroyed");
|
||||
await removeTab(devtoolsTab);
|
||||
await Promise.all([
|
||||
waitForRequestsToSettle(win.AboutDebugging.store),
|
||||
gDevTools.once("toolbox-destroyed"),
|
||||
]);
|
||||
await onToolboxDestroyed;
|
||||
// Changing the tab will also trigger a request to list tabs, so wait until the selected
|
||||
// tab has changed to wait for requests to settle.
|
||||
await waitUntil(() => gBrowser.selectedTab !== devtoolsTab);
|
||||
await waitForRequestsToSettle(win.AboutDebugging.store);
|
||||
}
|
||||
|
||||
async function reloadAboutDebugging(tab) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче