B2G/gecko/services/aitc/modules/browserid.js
/**
   * Gets the email which was used to login to 'domain'. If one was found,
   * _getAssertionWithEmail is called to obtain the assertion.
   */
Gets the email which was used to login to 'domain'. If one was found,
_getAssertionWithEmail is called to obtain the assertion.
Gets the email which was used to login to ' domain ' . If one was found _getAssertionWithEmail is called to obtain the assertion .
function _getAssertionWithDomain(sandbox, cb, domain,
                                                            audience) {
    let self = this;
    function onDomainSuccess(email) {
      if (email) {
        self._getAssertionWithEmail(sandbox, cb, email, audience);
      } else {
        sandbox.free();
        try {
          cb(new Error("No email found for _getAssertionWithDomain"), null);
        } catch(e) {
          self._log.warn("Callback threw in _getAssertionWithDomain " +
                         CommonUtils.exceptionStr(e));
        }
      }
    }
    sandbox.box.importFunction(onDomainSuccess);
    self._log.info("_getAssertionWithDomain Started");
    let scriptText =
      "onDomainSuccess(window.BrowserID.Storage.site.get(" +
        "'" + domain + "', "  +
        "'email'"             +
      "));";
    Cu.evalInSandbox(scriptText, sandbox.box, "1.8", this.ID_URI, 1);
  }
function _getAssertionWithDomain ( sandbox , cb , domain , audience ) { let self = this ; function onDomainSuccess ( email ) { if ( email ) { self . _getAssertionWithEmail ( sandbox , cb , email , audience ) ; } else { sandbox . free ( ) ; try { cb ( new Error ( "No email found for _getAssertionWithDomain" ) , null ) ; } catch ( e ) { self . _log . warn ( "Callback threw in _getAssertionWithDomain " + CommonUtils . exceptionStr ( e ) ) ; } } } sandbox . box . importFunction ( onDomainSuccess ) ; self . _log . info ( "_getAssertionWithDomain Started" ) ; let scriptText = "onDomainSuccess(window.BrowserID.Storage.site.get(" + "'" + domain + "', " + "'email'" + "));" ; Cu . evalInSandbox ( scriptText , sandbox . box , "1.8" , this . ID_URI , 1 ) ; }
Gets the email which was used to login to 'domain'.
Gets the email which was used to login to ' domain ' .
// This wil tell us which email was used to login to "domain", if any.