Bug 941540 - Add browser.permanentKey r=felipe
authorTim Taubert <ttaubert@mozilla.com>
Mon, 20 Jan 2014 20:44:25 +0100
changeset 165068 dcee48651880bc2267e5eaf17c8e5d9e4aae3ed2
parent 165067 71f78297c93af6e6a3126adb9bd9e34c7381bd1c
child 165069 0bc8711e7dd2b40002ffa82c97328536a81b4fe1
push id4561
push userttaubert@mozilla.com
push dateFri, 24 Jan 2014 17:59:54 +0000
treeherderfx-team@0bc8711e7dd2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs941540
milestone29.0a1
Bug 941540 - Add browser.permanentKey r=felipe
toolkit/content/widgets/browser.xml
--- 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];
           }