Only try to create an instance of the secure browser UI if PSM is installed. Bug=76292, r=timeless, sr=ben

This commit is contained in:
disttsc%bart.nl 2001-04-17 07:01:15 +00:00
Родитель ae41a2f55c
Коммит c5d74fa7e2
1 изменённых файлов: 11 добавлений и 9 удалений

Просмотреть файл

@ -27,17 +27,19 @@ var securityUI;
function SetSecurityButton()
{
var ui = Components.classes["@mozilla.org/secure_browser_ui;1"].createInstance();
securityUI = ui.QueryInterface(Components.interfaces.nsSecureBrowserUI);
const ui = Components.classes["@mozilla.org/secure_browser_ui;1"];
if (ui) {
var securityUI = ui.createInstance(Components.interfaces.nsSecureBrowserUI);
if ("gBrowser" in window) { // XXXjag see bug 68662
gBrowser.boxObject.setPropertyAsSupports("xulwindow", window);
gBrowser.boxObject.setPropertyAsSupports("secureBrowserUI", securityUI);
if ("gBrowser" in window) { // XXXjag see bug 68662
gBrowser.boxObject.setPropertyAsSupports("xulwindow", window);
gBrowser.boxObject.setPropertyAsSupports("secureBrowserUI", securityUI);
}
var button = document.getElementById("security-button");
if (button && _content)
securityUI.init(_content, button);
}
var button = document.getElementById('security-button');
if (button && window._content)
securityUI.init(window._content, button);
}
function displayPageInfo()