зеркало из https://github.com/mozilla/pjs.git
Fix for 25912. Making the security advisor in the Task menu not display any
information about the current page.
This commit is contained in:
Родитель
ddcfceb254
Коммит
0a4a31a412
|
@ -214,33 +214,37 @@ PRStatus DisplayPSMUIDialog(PCMT_CONTROL control, const char *pickledStatus, con
|
||||||
CMTSecurityAdvisorData data;
|
CMTSecurityAdvisorData data;
|
||||||
memset(&data, '\0', sizeof(CMTSecurityAdvisorData));
|
memset(&data, '\0', sizeof(CMTSecurityAdvisorData));
|
||||||
|
|
||||||
|
if (hostName)
|
||||||
data.infoContext = SSM_BROWSER;
|
|
||||||
data.hostname = (char*) hostName;
|
|
||||||
|
|
||||||
if (pickledStatus)
|
|
||||||
{
|
{
|
||||||
CMTItem pickledResource = {0, NULL, 0};
|
// if there is a hostName, than this request is about
|
||||||
CMUint32 socketStatus = 0;
|
// a webpage.
|
||||||
|
data.hostname = (char*) hostName;
|
||||||
|
data.infoContext = SSM_BROWSER;
|
||||||
|
|
||||||
pickledResource.len = *(int*)(pickledStatus);
|
if (pickledStatus)
|
||||||
pickledResource.data = (unsigned char*) PR_Malloc(SSMSTRING_PADDED_LENGTH(pickledResource.len));
|
|
||||||
|
|
||||||
if (! pickledResource.data) return PR_FAILURE;
|
|
||||||
|
|
||||||
memcpy(pickledResource.data, pickledStatus+sizeof(int), pickledResource.len);
|
|
||||||
|
|
||||||
/* Unpickle the SSL Socket Status */
|
|
||||||
if (CMT_UnpickleResource( control,
|
|
||||||
SSM_RESTYPE_SSL_SOCKET_STATUS,
|
|
||||||
pickledResource,
|
|
||||||
&socketStatus) == CMTSuccess)
|
|
||||||
{
|
{
|
||||||
data.infoContext = SSM_BROWSER;
|
CMTItem pickledResource = {0, NULL, 0};
|
||||||
data.resID = socketStatus;
|
CMUint32 socketStatus = 0;
|
||||||
}
|
|
||||||
|
pickledResource.len = *(int*)(pickledStatus);
|
||||||
|
pickledResource.data = (unsigned char*) PR_Malloc(SSMSTRING_PADDED_LENGTH(pickledResource.len));
|
||||||
|
|
||||||
|
if (! pickledResource.data) return PR_FAILURE;
|
||||||
|
|
||||||
PR_FREEIF(pickledResource.data);
|
memcpy(pickledResource.data, pickledStatus+sizeof(int), pickledResource.len);
|
||||||
|
|
||||||
|
/* Unpickle the SSL Socket Status */
|
||||||
|
if (CMT_UnpickleResource( control,
|
||||||
|
SSM_RESTYPE_SSL_SOCKET_STATUS,
|
||||||
|
pickledResource,
|
||||||
|
&socketStatus) == CMTSuccess)
|
||||||
|
{
|
||||||
|
data.infoContext = SSM_BROWSER;
|
||||||
|
data.resID = socketStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
PR_FREEIF(pickledResource.data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a Security Advisor context object. */
|
/* Create a Security Advisor context object. */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче