diff --git a/addon-sdk/source/lib/sdk/content/page-worker.js b/addon-sdk/source/lib/sdk/content/page-worker.js index cd709027615..e9e741120b6 100644 --- a/addon-sdk/source/lib/sdk/content/page-worker.js +++ b/addon-sdk/source/lib/sdk/content/page-worker.js @@ -57,6 +57,7 @@ const ChildPage = Class({ dispose: function() { pages.delete(this.id); this.webProgress.removeProgressListener(this); + this.webNav.close(); this.webNav = null; }, diff --git a/docshell/test/chrome/test_bug565388.xul b/docshell/test/chrome/test_bug565388.xul index 8cf1bbb80b8..47b5c07e4e8 100644 --- a/docshell/test/chrome/test_bug565388.xul +++ b/docshell/test/chrome/test_bug565388.xul @@ -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,"); + webNav.close(); SimpleTest.finish(); });