Bug 606366 - Port to SM Remove .wrappedJSObject gets that don't work with the new wrappers
authorIan Neal <iann_cvs@blueyonder.co.uk>
Sat, 23 Oct 2010 15:45:50 +0100
changeset 6575 13f39f4c363666bb36f3569a7d304ce38e1f83d1
parent 6574 04465db8a91363b0e654265e645bc9ed2b9b162c
child 6576 dfde00c9b4fc1519f98ffa9dcf54508bbf4da2a2
push id5067
push useriann_cvs@blueyonder.co.uk
push dateSat, 23 Oct 2010 14:46:35 +0000
treeherdercomm-central@13f39f4c3636 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs606366
Bug 606366 - Port to SM Remove .wrappedJSObject gets that don't work with the new wrappers r=Neil
suite/common/src/nsSessionStore.js
--- a/suite/common/src/nsSessionStore.js
+++ b/suite/common/src/nsSessionStore.js
@@ -1356,17 +1356,17 @@ SessionStoreService.prototype = {
       delete aTabData.pageStyle;
 
     this._updateTextAndScrollDataForFrame(aWindow, aBrowser.contentWindow,
                                           aTabData.entries[tabIndex],
                                           !aTabData._formDataSaved, aFullData);
     aTabData._formDataSaved = true;
     if (aBrowser.currentURI.spec == "about:config")
       aTabData.entries[tabIndex].formdata = {
-        "#textbox": aBrowser.contentDocument.getElementById("textbox").wrappedJSObject.value
+        "#textbox": aBrowser.contentDocument.getElementById("textbox").value
       };
   },
 
   /**
    * go through all subframes and store all form data, the current
    * scroll positions and innerHTML content of WYSIWYG editors
    * @param aWindow
    *        Window reference
@@ -2238,21 +2238,16 @@ SessionStoreService.prototype = {
         }
       }
     }
 
     // don't restore text data and scrolling state if the user has navigated
     // away before the loading completed (except for in-page navigation)
     if (hasExpectedURL(aEvent.originalTarget, aBrowser.__SS_restore_data.url)) {
       var content = aEvent.originalTarget.defaultView;
-      if (aBrowser.currentURI.spec == "about:config") {
-        // unwrap the document for about:config because otherwise the properties
-        // of the XBL bindings - as the textbox - aren't accessible (see bug 350718)
-        content = content.wrappedJSObject;
-      }
       restoreTextDataAndScrolling(content, aBrowser.__SS_restore_data, "");
       aBrowser.markupDocumentViewer.authorStyleDisabled = selectedPageStyle == "_nostyle";
 
       // notify the tabbrowser that this document has been completely restored
       var event = aBrowser.ownerDocument.createEvent("Events");
       event.initEvent("SSTabRestored", true, false);
       aBrowser.__SS_restore_tab.dispatchEvent(event);
     }