From 164a11fd9473ef3e3091c45fa8bd5505b0bc7231 Mon Sep 17 00:00:00 2001 From: "darin%meer.net" Date: Thu, 30 Oct 2003 02:20:08 +0000 Subject: [PATCH] fixes bug 86846 "PAC: Cannot display alert() in autproxy config file" r=biesi sr=bzbarsky --- netwerk/base/src/nsProxyAutoConfig.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/netwerk/base/src/nsProxyAutoConfig.js b/netwerk/base/src/nsProxyAutoConfig.js index a317e82ae71d..eb9df4c61376 100644 --- a/netwerk/base/src/nsProxyAutoConfig.js +++ b/netwerk/base/src/nsProxyAutoConfig.js @@ -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;