rem: formsArray = window._content.document.forms; 
add: formsArray = document.forms; 
context:     function getState(captureOrPrefill, threshhold) {      if (!window._content || !window._content.document) {        return hide;      }      // test for wallet service being available      var walletService = Components.classes["@mozilla.org/wallet/wallet-service;1"]        .getService(Components.interfaces.nsIWalletService);      if (!walletService) {        return hide;      }      var bestState = hide;      var state;      elementCount = 0;      // process frames if any      var formsArray;      var framesArray = window._content.frames;      if (framesArray.length != 0) {        var frame;        for (frame=0; frame<framesArray.length; frame++) {          formsArray = framesArray[frame].document.forms;          state =            getStateFromFormsArray(formsArray, captureOrPrefill, threshhold, walletService);          if (state == enable) {            if (elementCount > threshhold) {              return enable;            }            bestState = enable;          } else if (state == disable && bestState == hide) {            bestState = disable;          }        }      }      // process top-level document      formsArray = window._content.document.forms;      state =        getStateFromFormsArray(formsArray, captureOrPrefill, threshhold, walletService);      if (state == enable) {        if (elementCount > threshhold) {          return enable;        }        bestState = enable;      } else if (state == disable && bestState == hide) {        bestState = disable;      }      // if we got here, then there was no text (or select) element with a value      // or there were too few text (or select) elements      if (elementCount > threshhold) {        // no text (or select) element with a value        return bestState;      }      // too few text (or select) elements      return hide;    }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/32a0e534c97f2f09f249265b62fe2d82b898b113/walletOverlay.js/clean/extensions/wallet/resources/content/walletOverlay.js