JSObject         *obj;
nsCryptoRunnable::Run() {  char              msg[512];   nsIScriptContext *scriptCx;  nsresult          rv;  PRBool            reportErrors = PR_FALSE;  JSObject         *obj;  JSStackFrame     *fp=nsnull;  nsCrypto         *cryptoObject;#if 0   PR_snprintf(msg, 512, "Javi's test of JS_ReportError from a separate thread.\n");  if (mHandlerInfo->cx->fp == nsnull) {    rv = nsJSUtils::nsGetDynamicScriptContext(mHandlerInfo->cx, &scriptCx);    if (NS_FAILED(rv)){      reportErrors = PR_FALSE;    } else {      rv = mHandlerInfo->cryptoObject->GetScriptObject(scriptCx,                                                       (void**)&obj);      if (NS_FAILED(rv)) {        reportErrors = PR_FALSE;      } else {        fp = (JSStackFrame*)JS_GetPrivate(mHandlerInfo->cx,obj);      }    }  }    JS_ReportError(mHandlerInfo->cx, msg);#endif  if (mHandlerInfo->result != CMTSuccess) {    if (reportErrors) {      JS_ReportError(mHandlerInfo->cx, "%s%s\n", JS_ERROR,                     "generation of key(s) failed");    }    goto loser;  }    cryptoObject = mHandlerInfo->cryptoObject;  CMT_UnregisterEventHandler(mHandlerInfo->control,                              SSM_TASK_COMPLETED_EVENT,                             mHandlerInfo->keyGenContext);  rv = cryptojs_CreateCRMFRequests(mHandlerInfo->control,                                   mHandlerInfo->context,                                    mHandlerInfo->cx,                                   mHandlerInfo->keyids,                                   mHandlerInfo->numRequests,                                   &mHandlerInfo->reqDN,                                   &mHandlerInfo->regToken,                                   &mHandlerInfo->authenticator,                                   &mHandlerInfo->eaCert,                                   mHandlerInfo->crmfObject,                                   mHandlerInfo, cryptoObject, reportErrors);  if (fp) {    mHandlerInfo->cx->fp = nsnull;  }  cryptojs_DestroyKeys(mHandlerInfo->control, mHandlerInfo->keyids,                        mHandlerInfo->numRequests);  CMT_DestroyResource(mHandlerInfo->control,                      mHandlerInfo->keyGenContext,                      SSM_RESTYPE_KEYGEN_CONTEXT);  delete []mHandlerInfo->keyids;  if (NS_FAILED(rv)) {    return rv;  }  return NS_OK; loser:  if (fp) {    mHandlerInfo->cx->fp = nsnull;  }  cryptojs_DestroyKeys(mHandlerInfo->control, mHandlerInfo->keyids,                        mHandlerInfo->numRequests);  CMT_DestroyResource(mHandlerInfo->control,                      mHandlerInfo->keyGenContext,                      SSM_RESTYPE_KEYGEN_CONTEXT);  delete []mHandlerInfo->keyids;  return NS_ERROR_FAILURE;}