rem: bestState = enable; } else if (state == disable && bestState == hide) { bestState = disable; 
context:     function getState(captureOrPrefill, threshhold) {      if (!window._content || !window._content.document) {        return hide;      }      var document = window._content.document;      if (!("forms" in document)) {        // this will occur if document is xul document instead of html document for example        return hide;      }      // test for wallet service being available      if (gWalletService == -1)        gWalletService = Components.classes["@mozilla.org/wallet/wallet-service;1"]                                   .getService(Components.interfaces.nsIWalletService);      if (!gWalletService) {        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);          if (state == enable) {            if (elementCount > threshhold) {              gIsEncrypted = -1;              return enable;            }            bestState = enable;          } else if (state == disable && bestState == hide) {            bestState = disable;          }        }      }      // process top-level document      formsArray = document.forms;      state =        getStateFromFormsArray(formsArray, captureOrPrefill, threshhold);      gIsEncrypted = -1;      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: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/bde911aa1874be0f4134140429231543b710bc39/walletOverlay.js/buggy/extensions/wallet/resources/content/walletOverlay.js