mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1598516 - Make Quitter extension retry sending the quit message in case the background script wasn't ready yet. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D55604 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c10f854a76
commit
cd8f1a4e6c
@ -7,8 +7,12 @@
|
||||
/* eslint-env webextensions */
|
||||
|
||||
const Quitter = {
|
||||
quit() {
|
||||
browser.runtime.sendMessage("quit");
|
||||
async quit() {
|
||||
// This can be called before the background page has loaded,
|
||||
// so we need to wait for it.
|
||||
browser.runtime.sendMessage("quit").catch(() => {
|
||||
setTimeout(this.quit, 100);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user