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
parent f3ef614ee5
commit 164a11fd94

View File

@ -128,6 +128,7 @@ nsProxyAutoConfig.prototype = {
ProxySandBox.myIP = "127.0.0.1"; ProxySandBox.myIP = "127.0.0.1";
} }
ProxySandBox.dnsResolve = dnsResolve; ProxySandBox.dnsResolve = dnsResolve;
ProxySandBox.alert = proxyAlert;
LocalFindProxyForURL=ProxySandBox.FindProxyForURL; LocalFindProxyForURL=ProxySandBox.FindProxyForURL;
this.done = true; 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) // Synchronous calls to nsDNSService::Resolve ignore the cache! (bug 97097)
// Keep a simple one of our own. // Keep a simple one of our own.
var dnsResolveCachedHost = null; var dnsResolveCachedHost = null;