Bug 1239822: Part 2b - Destroy windowless browsers created for add-on SDK page workers.

This commit is contained in:
Kris Maglione 2016-01-15 13:35:17 -08:00
parent ea8f5512dc
commit 63b93c5c89
2 changed files with 5 additions and 2 deletions

View File

@ -57,6 +57,7 @@ const ChildPage = Class({
dispose: function() {
pages.delete(this.id);
this.webProgress.removeProgressListener(this);
this.webNav.close();
this.webNav = null;
},

View File

@ -55,9 +55,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=565388
var systemPrincipal = Cc["@mozilla.org/systemprincipal;1"].
createInstance(Ci.nsIPrincipal);
var docShell = Cc["@mozilla.org/appshell/appShellService;1"].
var webNav = Cc["@mozilla.org/appshell/appShellService;1"].
getService(Ci.nsIAppShellService).
createWindowlessBrowser(true).
createWindowlessBrowser(true);
var docShell = webNav.
QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIDocShell);
docShell.createAboutBlankContentViewer(systemPrincipal);
@ -65,6 +66,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=565388
progressListener.add(docShell, function(){
is(win.document.documentURI, "data:application/vnd.mozilla.xul+xml;charset=utf-8,<window/>");
webNav.close();
SimpleTest.finish();
});