Bug 1382637 - Zombify tabs in onDestroy to ensure video/audio recording ends when Fennec is swipe-to-killed. r=snorp

This commit is contained in:
Dylan Roeh 2019-01-23 11:41:01 -06:00
parent 376e2e4fdd
commit 978362d8c2
2 changed files with 10 additions and 0 deletions

View File

@ -1549,6 +1549,8 @@ public class BrowserApp extends GeckoApp
NotificationHelper.destroy();
GeckoNetworkManager.destroy();
EventDispatcher.getInstance().dispatch("Browser:ZombifyTabs", null);
MmaDelegate.flushResources(this);
super.onDestroy();

View File

@ -371,6 +371,7 @@ var BrowserApp = {
GlobalEventDispatcher.registerListener(this, [
"Browser:LoadManifest",
"Browser:Quit",
"Browser:ZombifyTabs",
"Fonts:Reload",
"FormHistory:Init",
"FullScreen:Exit",
@ -1730,6 +1731,13 @@ var BrowserApp = {
this.quit(data);
break;
case "Browser:ZombifyTabs":
let tabs = this._tabs;
for (let i = 0; i < tabs.length; i++) {
tabs[i].zombify();
}
break;
case "Fonts:Reload":
FontEnumerator.updateFontList();
break;