fixes bug 86846 "PAC: Cannot display alert() in autproxy config file" r=biesi sr=bzbarsky

This commit is contained in:
darin%meer.net 2003-10-30 02:20:08 +00:00
Родитель f3ef614ee5
Коммит 164a11fd94
1 изменённых файлов: 11 добавлений и 0 удалений

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

@ -128,6 +128,7 @@ nsProxyAutoConfig.prototype = {
ProxySandBox.myIP = "127.0.0.1";
}
ProxySandBox.dnsResolve = dnsResolve;
ProxySandBox.alert = proxyAlert;
LocalFindProxyForURL=ProxySandBox.FindProxyForURL;
this.done = true;
},
@ -138,6 +139,16 @@ nsProxyAutoConfig.prototype = {
}
}
function proxyAlert(msg) {
try {
var cns = Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService);
cns.logStringMessage("PAC-alert: "+msg);
} catch (e) {
dump("PAC: proxyAlert ERROR: "+e+"\n");
}
}
// Synchronous calls to nsDNSService::Resolve ignore the cache! (bug 97097)
// Keep a simple one of our own.
var dnsResolveCachedHost = null;