rem: var dataObject = gCurrentWindow.GetFields(); 
add: var dataObject = this.dataManager.getPageData(aPageTag); dataObject = this.contentArea.GetFields(dataObject); 
context:   savePageData: function (aPageTag, aWindow)  {    gCurrentWindow = aWindow || this.contentArea;          if (!(aPageTag in this.dataManager.pageData))      return;    if ("GetFields" in gCurrentWindow) {      // save page data based on user supplied function in content area      var dataObject = gCurrentWindow.GetFields();      if (dataObject)        this.dataManager.setPageData( aPageTag, dataObject );    }    // Automatic element retrieval. This is done in two ways.    // 1) if an element id array is present in the document, this is    //    used to build a list of elements to persist. <-- performant    // 2) otherwise, all elements with "wsm_persist" set to true    //    are persisted <-- non-performant.    var elements;    if ("_elementIDs" in gCurrentWindow) {      elements = [];      for (var i = 0; i < gCurrentWindow._elementIDs.length; i++) {        var elt = gCurrentWindow.document.getElementById(gCurrentWindow._elementIDs[i]);        if (elt)          elements[elements.length] = elt;        else {          // see bug #40329. People forget this too often, and it breaks Prefs          dump("*** FIX ME: '_elementIDs' in '" + gCurrentWindow.location.href.split('/').pop() +               "' contains a reference to a non-existent element ID '" +          gCurrentWindow._elementIDs[i] + "'.\n");        }      }    }    else       elements = gCurrentWindow.document.getElementsByAttribute("wsm_persist", "true");    for (var ii = 0; ii < elements.length; ii++) {      var elementID   = elements[ii].id;      var elementType = elements[ii].localName;            if (!(aPageTag in this.dataManager.pageData) )        this.dataManager.pageData[aPageTag] = new Object();      this.dataManager.pageData[aPageTag][elementID] = new Object();            // persist attributes      var get_Func = (elementType in this.handlers) ?      this.handlers[elementType].get :      this.handlers.default_handler.get;      this.dataManager.setItemData(aPageTag, elementID, get_Func(elementID));    }  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4c9254e33ba3541fbff81440dc65835639ed2f47/nsWidgetStateManager.js/buggy/toolkit/content/nsWidgetStateManager.js