зеркало из https://github.com/mozilla/gecko-dev.git
Make SendUIEvent take a bit for isModal instead of always hard-coding it
to true.
This commit is contained in:
Родитель
80e2d2ccc8
Коммит
cd6d0787cd
|
@ -848,7 +848,8 @@ SSMSecurityAdvisorContext_FindCertByNickname(SSMSecurityAdvisorContext *cx,
|
|||
"choose_cert",
|
||||
&cx->super,
|
||||
params,
|
||||
&cx->super.m_clientContext);
|
||||
&cx->super.m_clientContext,
|
||||
PR_TRUE);
|
||||
/* Now wait until we are notified by the handler that the user
|
||||
* has selected a cert.
|
||||
*/
|
||||
|
|
|
@ -416,8 +416,10 @@ endloop:
|
|||
|
||||
/* Send a UI event to client */
|
||||
rv = SSMControlConnection_SendUIEvent(ctrl, "get",
|
||||
"cert_renewal",
|
||||
&(certRes->super), NULL, &(&(ctrl->super.super))->m_clientContext);
|
||||
"cert_renewal",
|
||||
&(certRes->super), NULL,
|
||||
&(&(ctrl->super.super))->m_clientContext,
|
||||
PR_TRUE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
goto loser;
|
||||
}
|
||||
|
|
|
@ -771,7 +771,8 @@ SSMStatus SSM_ProcessCertDeleteButton(HTTPRequest * req)
|
|||
formName);
|
||||
SSM_LockUIEvent(&req->ctrlconn->super.super);
|
||||
rv = SSMControlConnection_SendUIEvent(req->ctrlconn, "cert", "delete_cert",
|
||||
target, params, &target->m_clientContext);
|
||||
target, params,
|
||||
&target->m_clientContext, PR_TRUE);
|
||||
SSM_WaitUIEvent(&req->ctrlconn->super.super, PR_INTERVAL_NO_TIMEOUT);
|
||||
/* See if the user canceled, if so send back HTTP_NO_CONTENT
|
||||
* so security advisor doesn't redraw the same content.
|
||||
|
@ -2171,7 +2172,8 @@ SSMStatus SSM_ProcessLDAPWindow(HTTPRequest * req)
|
|||
SSMControlConnection_SendUIEvent(req->ctrlconn, "get",
|
||||
"show_followup", NULL,
|
||||
"result=no_ldap_setup",
|
||||
&((SSMResource *)req->ctrlconn)->m_clientContext);
|
||||
&((SSMResource *)req->ctrlconn)->m_clientContext,
|
||||
PR_TRUE);
|
||||
goto loser;
|
||||
}
|
||||
|
||||
|
@ -2200,7 +2202,8 @@ SSMStatus SSM_ProcessLDAPWindow(HTTPRequest * req)
|
|||
SSM_LockUIEvent(target);
|
||||
rv = SSMControlConnection_SendUIEvent(req->ctrlconn, "get",
|
||||
"ldap_request", target,
|
||||
params, &target->m_clientContext);
|
||||
params, &target->m_clientContext,
|
||||
PR_TRUE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
SSM_UnlockUIEvent(target);
|
||||
goto loser;
|
||||
|
|
|
@ -2393,7 +2393,8 @@ SSMControlConnection_SendUIEvent(SSMControlConnection *conn,
|
|||
char *baseRef,
|
||||
SSMResource *target, /* can pass NULL */
|
||||
char *otherParams /* can pass NULL */,
|
||||
CMTItem * clientContext /* can pass NULL */)
|
||||
CMTItem * clientContext /* can pass NULL */,
|
||||
PRBool isModal)
|
||||
{
|
||||
char *url;
|
||||
SECItem event;
|
||||
|
@ -2423,7 +2424,7 @@ SSMControlConnection_SendUIEvent(SSMControlConnection *conn,
|
|||
reply.resourceID = rid;
|
||||
reply.width = width;
|
||||
reply.height = height;
|
||||
reply.isModal = CM_TRUE;
|
||||
reply.isModal = isModal;
|
||||
reply.url = url;
|
||||
if (clientContext) {
|
||||
reply.clientContext = *clientContext;
|
||||
|
|
|
@ -131,7 +131,8 @@ SSMStatus SSMControlConnection_SendUIEvent(SSMControlConnection *conn,
|
|||
char *baseRef,
|
||||
SSMResource *target, /* can pass NULL */
|
||||
char *otherParams /* can pass NULL */,
|
||||
CMTItem * clientContext /* can pass NULL */);
|
||||
CMTItem * clientContext /* can pass NULL */,
|
||||
PRBool isModal);
|
||||
|
||||
/*
|
||||
* NOTES
|
||||
|
|
|
@ -112,7 +112,8 @@ SSMKeyGenContext_Init(SSMKeyGenContext *ct,
|
|||
"keygen_window",
|
||||
SSMRESOURCE(ct),
|
||||
NULL,
|
||||
&SSMRESOURCE(ct)->m_clientContext);
|
||||
&SSMRESOURCE(ct)->m_clientContext,
|
||||
PR_FALSE);
|
||||
/*
|
||||
* UI isn't crucial for the keygen to work, don't bail if sending UI
|
||||
* didn't work.
|
||||
|
@ -945,7 +946,8 @@ SSMKeyGenContext_SendEscrowWarning(SSMKeyGenContext *ct,
|
|||
rv = SSMControlConnection_SendUIEvent(SSMRESOURCE(ct)->m_connection,
|
||||
"get", "escrow_warning",
|
||||
SSMRESOURCE(ct), NULL,
|
||||
&SSMRESOURCE(ct)->m_clientContext);
|
||||
&SSMRESOURCE(ct)->m_clientContext,
|
||||
PR_FALSE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
goto loser;
|
||||
}
|
||||
|
|
|
@ -168,7 +168,8 @@ SSMStatus SSMKeyGenContext_GetSlot(SSMKeyGenContext * keyctxt,
|
|||
"select_token",
|
||||
(SSMResource *)keyctxt,
|
||||
mech,
|
||||
&((SSMResource*)keyctxt)->m_clientContext);
|
||||
&((SSMResource*)keyctxt)->m_clientContext,
|
||||
PR_TRUE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
if (keyctxt->super.m_UILock != NULL) {
|
||||
PR_ExitMonitor(keyctxt->super.m_UILock);
|
||||
|
|
|
@ -583,8 +583,8 @@ certificate_conflict(SSMControlConnection * cx, SECItem * derCert,
|
|||
rv = SECFailure;
|
||||
if (sendUIEvent && (SSMControlConnection_SendUIEvent(cx,
|
||||
"get", "cert_already_exists",
|
||||
NULL, NULL, NULL)) == SSM_SUCCESS)
|
||||
rv = SECSuccess;
|
||||
NULL, NULL, NULL, PR_TRUE)) == SSM_SUCCESS)
|
||||
rv = SECSuccess;
|
||||
ret = PR_FALSE;
|
||||
goto done;
|
||||
} else
|
||||
|
@ -969,7 +969,8 @@ SSMStatus SSM_CertCAImportCommandHandler1(HTTPRequest *req)
|
|||
rv=SSMControlConnection_SendUIEvent(req->ctrlconn,
|
||||
"get", "import_ca_cert2",
|
||||
req->target, NULL,
|
||||
&req->target->m_clientContext);
|
||||
&req->target->m_clientContext,
|
||||
PR_TRUE);
|
||||
if (rv != PR_SUCCESS) {
|
||||
/* problem! */
|
||||
SSM_DEBUG("Cannot fire second dialog for CA cert importation!\n");
|
||||
|
@ -1113,7 +1114,7 @@ static void SSM_ImportCACert(void * arg)
|
|||
SSM_LockUIEvent(certObj);
|
||||
rv = SSMControlConnection_SendUIEvent(ctrl, "get", "import_ca_cert1",
|
||||
certObj, params,
|
||||
&certObj->m_clientContext);
|
||||
&certObj->m_clientContext, PR_TRUE);
|
||||
if (rv != PR_SUCCESS) {
|
||||
SSM_DEBUG("Cannot fire up first import CA cert dialog!\n");
|
||||
goto done;
|
||||
|
|
|
@ -269,7 +269,8 @@ ssmpkcs12context_createpkcs12file(SSMPKCS12Context *cxt,
|
|||
SSMRESOURCE(cxt),
|
||||
(numCerts > 1) ? "multipleCerts=1" :
|
||||
NULL,
|
||||
&SSMRESOURCE(cxt)->m_clientContext);
|
||||
&SSMRESOURCE(cxt)->m_clientContext,
|
||||
PR_TRUE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
SSM_UnlockResource(SSMRESOURCE(cxt));
|
||||
goto loser;
|
||||
|
@ -600,7 +601,9 @@ SSMPKCS12Context_ChooseSlotForImport(SSMPKCS12Context *cxt,
|
|||
"get",
|
||||
"select_token",
|
||||
&cxt->super,
|
||||
mech, &SSMRESOURCE(cxt)->m_clientContext);
|
||||
mech,
|
||||
&SSMRESOURCE(cxt)->m_clientContext,
|
||||
PR_TRUE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
SSM_UnlockResource(&cxt->super);
|
||||
return NULL;
|
||||
|
@ -894,7 +897,8 @@ void SSMPKCS12Context_BackupMultipleCertsThread(void *arg)
|
|||
rv = SSMControlConnection_SendUIEvent(connection,
|
||||
"get", "backup_new_cert",
|
||||
&p12Cxt->super, NULL,
|
||||
&p12Cxt->super.m_clientContext);
|
||||
&p12Cxt->super.m_clientContext,
|
||||
PR_TRUE);
|
||||
PR_ASSERT(SSMRESOURCE(p12Cxt)->m_buttonType == SSM_BUTTON_NONE);
|
||||
if (rv == SSM_SUCCESS) {
|
||||
while (SSMRESOURCE(p12Cxt)->m_buttonType == SSM_BUTTON_NONE) {
|
||||
|
|
|
@ -655,7 +655,8 @@ SSMStatus SSM_ReSetPasswordKeywordHandler(SSMTextGenContext * cx)
|
|||
SSM_LockUIEvent(target);
|
||||
rv = SSMControlConnection_SendUIEvent(cx->m_request->ctrlconn,
|
||||
"get", "select_token",
|
||||
target,mech,&target->m_clientContext);
|
||||
target,mech,
|
||||
&target->m_clientContext, PR_TRUE);
|
||||
SSM_WaitUIEvent(target, PR_INTERVAL_NO_TIMEOUT);
|
||||
slot = (PK11SlotInfo *) target->m_uiData;
|
||||
if (!slot)
|
||||
|
@ -861,7 +862,8 @@ SSMStatus SSM_SetDBPasswordHandler(HTTPRequest * req)
|
|||
SSMControlConnection_SendUIEvent(req->ctrlconn, "get",
|
||||
"show_followup", NULL,
|
||||
result,
|
||||
&((SSMResource *)req->ctrlconn)->m_clientContext);
|
||||
&((SSMResource *)req->ctrlconn)->m_clientContext,
|
||||
PR_TRUE);
|
||||
|
||||
PR_FREEIF(responseKey);
|
||||
done:
|
||||
|
@ -906,7 +908,8 @@ SSMStatus SSM_SetUserPassword(PK11SlotInfo * slot, SSMResource * ct)
|
|||
rv = SSMControlConnection_SendUIEvent(ct->m_connection,
|
||||
"get", "set_password",
|
||||
ct, params,
|
||||
&ct->m_clientContext);
|
||||
&ct->m_clientContext,
|
||||
PR_TRUE);
|
||||
if (rv != SSM_SUCCESS)
|
||||
goto loser;
|
||||
SSM_WaitUIEvent(ct, PR_INTERVAL_NO_TIMEOUT);
|
||||
|
@ -934,7 +937,8 @@ SSMStatus SSM_ProcessPasswordWindow(HTTPRequest * req)
|
|||
rv = SSMControlConnection_SendUIEvent(req->ctrlconn, "get",
|
||||
"set_password", target,
|
||||
"slot=all&mech=1",
|
||||
&target->m_clientContext);
|
||||
&target->m_clientContext,
|
||||
PR_TRUE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
SSM_UnlockUIEvent(&req->ctrlconn->super.super);
|
||||
goto loser;
|
||||
|
|
|
@ -605,6 +605,13 @@ SSM_GetResourceReference(SSMResource *res)
|
|||
SSM_LockResource(res);
|
||||
res->m_refCount++;
|
||||
SSM_DEBUG("Get ref - rsrcid: %ld ++refcnt: %ld\n", res->m_id, res->m_refCount);
|
||||
switch (res->m_classType) {
|
||||
case SSM_RESTYPE_CONTROL_CONNECTION:
|
||||
SSM_DEBUG("Getting a reference for the control connection\n");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
SSM_UnlockResource(res);
|
||||
|
||||
return PR_SUCCESS;
|
||||
|
@ -624,6 +631,13 @@ SSM_FreeResource(SSMResource *res)
|
|||
refcnt = --(res->m_refCount);
|
||||
SSM_DEBUG("Free ref - rsrcid: %ld --refcnt: %ld\n", res->m_id, res->m_refCount);
|
||||
res->m_refCount = refcnt;
|
||||
switch (res->m_classType) {
|
||||
case SSM_RESTYPE_CONTROL_CONNECTION:
|
||||
SSM_DEBUG("Giving up a reference to the control connection\n");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
SSM_UnlockResource(res);
|
||||
|
||||
/* need to handle race condition on destroy */
|
||||
|
|
|
@ -248,11 +248,14 @@ SSMSignTextResource_ServiceThread(void *arg)
|
|||
|
||||
/* Send UI event to client */
|
||||
if (signTextRes->m_autoFlag == PR_TRUE) {
|
||||
rv = SSMControlConnection_SendUIEvent(signTextRes->m_conn, "get", "signtext_auto", SSMRESOURCE(signTextRes), NULL,
|
||||
&SSMRESOURCE(signTextRes)->m_clientContext);
|
||||
rv = SSMControlConnection_SendUIEvent(signTextRes->m_conn, "get",
|
||||
"signtext_auto",
|
||||
SSMRESOURCE(signTextRes), NULL,
|
||||
&SSMRESOURCE(signTextRes)->m_clientContext,
|
||||
PR_TRUE);
|
||||
} else {
|
||||
rv = SSMControlConnection_SendUIEvent(signTextRes->m_conn, "get", "signtext_ask", SSMRESOURCE(signTextRes), NULL,
|
||||
&SSMRESOURCE(signTextRes)->m_clientContext);
|
||||
&SSMRESOURCE(signTextRes)->m_clientContext, PR_TRUE);
|
||||
}
|
||||
if (rv != PR_SUCCESS) {
|
||||
goto loser;
|
||||
|
|
|
@ -79,7 +79,8 @@ SSMStatus SSM_SSLMakeBadClientAuthDialog(SSMSSLDataConnection* conn)
|
|||
/* fire up the UI */
|
||||
rv = SSMControlConnection_SendUIEvent(SSMCONTROLCONNECTION(conn), "get",
|
||||
"bad_client_auth",
|
||||
SSMRESOURCE(conn), NULL,&SSMRESOURCE(conn)->m_clientContext);
|
||||
SSMRESOURCE(conn), NULL,
|
||||
&SSMRESOURCE(conn)->m_clientContext, PR_TRUE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
goto loser;
|
||||
}
|
||||
|
@ -294,7 +295,7 @@ SSMStatus SSM_SSLMakeClientAuthDialog(SSMSSLDataConnection* conn)
|
|||
/* fire up the UI */
|
||||
rv = SSMControlConnection_SendUIEvent(SSMCONTROLCONNECTION(conn), "get",
|
||||
"client_auth", SSMRESOURCE(conn),
|
||||
NULL, &SSMRESOURCE(conn)->m_clientContext);
|
||||
NULL, &SSMRESOURCE(conn)->m_clientContext, PR_TRUE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
goto loser;
|
||||
}
|
||||
|
@ -666,7 +667,7 @@ SECStatus SSM_SSLMakeCertExpiredDialog(CERTCertificate* cert,
|
|||
|
||||
/* fire up the UI */
|
||||
if (SSMControlConnection_SendUIEvent(SSMCONTROLCONNECTION(conn), "get",
|
||||
baseRef, SSMRESOURCE(conn), NULL,&SSMRESOURCE(conn)->m_clientContext) != SSM_SUCCESS) {
|
||||
baseRef, SSMRESOURCE(conn), NULL,&SSMRESOURCE(conn)->m_clientContext, PR_TRUE) != SSM_SUCCESS) {
|
||||
rv = SECFailure;
|
||||
goto loser;
|
||||
}
|
||||
|
@ -1184,7 +1185,9 @@ SECStatus SSM_SSLMakeCertBadDomainDialog(CERTCertificate* cert,
|
|||
/* fire up the UI */
|
||||
if (SSMControlConnection_SendUIEvent(SSMCONTROLCONNECTION(conn), "get",
|
||||
"bad_server_cert_domain",
|
||||
SSMRESOURCE(conn), NULL, &SSMRESOURCE(conn)->m_clientContext) != SSM_SUCCESS) {
|
||||
SSMRESOURCE(conn), NULL,
|
||||
&SSMRESOURCE(conn)->m_clientContext,
|
||||
PR_TRUE) != SSM_SUCCESS) {
|
||||
rv = SECFailure;
|
||||
goto loser;
|
||||
}
|
||||
|
@ -1436,8 +1439,8 @@ SECStatus SSM_SSLMakeUnknownIssuerDialog(CERTCertificate* cert,
|
|||
/* fire up the UI */
|
||||
if (SSMControlConnection_SendUIEvent(SSMCONTROLCONNECTION(conn), "get",
|
||||
"bad_server_cert_unknown_issuer1",
|
||||
SSMRESOURCE(conn), NULL, &SSMRESOURCE(conn)->m_clientContext) !=
|
||||
SSM_SUCCESS) {
|
||||
SSMRESOURCE(conn), NULL,
|
||||
&SSMRESOURCE(conn)->m_clientContext, PR_TRUE) != SSM_SUCCESS) {
|
||||
rv = SECFailure;
|
||||
goto loser;
|
||||
}
|
||||
|
@ -1549,7 +1552,7 @@ SSMStatus ssm_http_unknown_issuer_step1_handle_next_button(HTTPRequest* req)
|
|||
/* fire up the next dialog */
|
||||
rv = SSMControlConnection_SendUIEvent(SSMCONTROLCONNECTION(conn), "get",
|
||||
"bad_server_cert_unknown_issuer2",
|
||||
SSMRESOURCE(conn), NULL, &SSMRESOURCE(conn)->m_clientContext);
|
||||
SSMRESOURCE(conn), NULL, &SSMRESOURCE(conn)->m_clientContext, PR_TRUE);
|
||||
if (rv != SSM_SUCCESS) {
|
||||
goto loser;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче