Bug 941540 - Add browser.permanentKey r=felipe
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -365,16 +365,21 @@
this._fastFind = Components.classes["@mozilla.org/typeaheadfind;1"]
.createInstance(Components.interfaces.nsITypeAheadFind);
this._fastFind.init(this.docShell);
}
return this._fastFind;
]]></getter>
</property>
+ <field name="_permanentKey">({})</field>
+
+ <property name="permanentKey" readonly="true"
+ onget="return this._permanentKey;"/>
+
<field name="_lastSearchString">null</field>
<field name="_lastSearchHighlight">false</field>
<property name="webProgress"
readonly="true"
onget="return this.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebProgress);"/>
<field name="_contentWindow">null</field>
@@ -1177,17 +1182,23 @@
<body>
<![CDATA[
// We need to swap fields that are tied to our docshell or related to
// the loaded page
// Fields which are built as a result of notifactions (pageshow/hide,
// DOMLinkAdded/Removed, onStateChange) should not be swapped here,
// because these notifications are dispatched again once the docshells
// are swapped.
- var fieldsToSwap = [ "_docShell", "_webBrowserFind", "_contentWindow", "_webNavigation"];
+ var fieldsToSwap = [
+ "_docShell",
+ "_webBrowserFind",
+ "_contentWindow",
+ "_webNavigation",
+ "_permanentKey"
+ ];
var ourFieldValues = {};
var otherFieldValues = {};
for each (var field in fieldsToSwap) {
ourFieldValues[field] = this[field];
otherFieldValues[field] = aOtherBrowser[field];
}