fix for #106165. fix js warning when psm not built or installed. r/sr=bienvenu

This commit is contained in:
sspitzer%netscape.com 2001-10-23 02:11:08 +00:00
parent a2107b2f4f
commit b5586a89ce

View File

@ -119,18 +119,18 @@ function CreateMailWindowGlobals()
// try to create and register ourselves with a security icon...
var securityIcon = document.getElementById("security-button");
if (securityIcon)
{
if (securityIcon) {
// if the client isn't built with psm enabled then we won't have a secure UI to monitor the lock icon
// so be sure to wrap this in a try / catch clause...
try
{
var secureUI = Components.classes[secureUIContractID].createInstance();
try {
var secureUI;
// we may not have a secure UI if psm isn't installed!
if (secureUI)
{
secureUI = secureUI.QueryInterface(Components.interfaces.nsISecureBrowserUI);
secureUI.init(_content, securityIcon);
if (secureUIContractID in Components.classes) {
secureUI = Components.classes[secureUIContractID].createInstance();
if (secureUI) {
secureUI = secureUI.QueryInterface(Components.interfaces.nsISecureBrowserUI);
secureUI.init(_content, securityIcon);
}
}
}
catch (ex) {}