mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 517768 - crash with view page source and external editor [@nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, unsigned int) ]. r=bz
This commit is contained in:
parent
628a6ad230
commit
705bcd826f
@ -141,6 +141,7 @@ var gViewSourceUtils = {
|
|||||||
// at all correctly; if somehow the view-source stuff managed to
|
// at all correctly; if somehow the view-source stuff managed to
|
||||||
// execute script we'd be in big trouble here, I suspect.
|
// execute script we'd be in big trouble here, I suspect.
|
||||||
var webShell = Components.classes["@mozilla.org/docshell;1"].createInstance();
|
var webShell = Components.classes["@mozilla.org/docshell;1"].createInstance();
|
||||||
|
webShell.QueryInterface(Components.interfaces.nsIBaseWindow).create();
|
||||||
this.viewSourceProgressListener.webShell = webShell;
|
this.viewSourceProgressListener.webShell = webShell;
|
||||||
var progress = webShell.QueryInterface(this.mnsIWebProgress);
|
var progress = webShell.QueryInterface(this.mnsIWebProgress);
|
||||||
progress.addProgressListener(this.viewSourceProgressListener,
|
progress.addProgressListener(this.viewSourceProgressListener,
|
||||||
@ -214,6 +215,7 @@ var gViewSourceUtils = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
|
this.webShell.QueryInterface(Components.interfaces.nsIBaseWindow).destroy();
|
||||||
this.webShell = null;
|
this.webShell = null;
|
||||||
this.editor = null;
|
this.editor = null;
|
||||||
this.callBack = null;
|
this.callBack = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user