Bug 903293 - Remote browser constructors shouldn't try to initialize session history; r=felipe

This commit is contained in:
Tim Taubert 2013-08-12 20:16:11 +02:00
parent 5a99f8d881
commit 69588e07bf

View File

@ -669,7 +669,7 @@
<constructor>
<![CDATA[
try {
if (!this.hasAttribute("disablehistory")) {
if (this.docShell && !this.hasAttribute("disablehistory")) {
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.addObserver(this, "browser:purge-session-history", false);
@ -678,7 +678,7 @@
Components.classes["@mozilla.org/browser/shistory;1"]
.createInstance(Components.interfaces.nsISHistory);
// enable global history if we weren't told otherwise
if (this.docShell && !this.hasAttribute("disableglobalhistory"))
if (!this.hasAttribute("disableglobalhistory"))
this.docShell.useGlobalHistory = true;
}
}