From 1bc0fa3b1c9e773a83a5bbcb52237249f766c381 Mon Sep 17 00:00:00 2001 From: "bbaetz%cs.mcgill.ca" Date: Fri, 27 Jul 2001 21:34:41 +0000 Subject: [PATCH] Bug 80363. Handle failure trying to get the machine's IP. This broke PAC on the mac because of bug 92516. r=pink, sr=darin, a=blizzard --- netwerk/base/src/nsProxyAutoConfig.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/netwerk/base/src/nsProxyAutoConfig.js b/netwerk/base/src/nsProxyAutoConfig.js index 4e127c098b1a..38be3f5c4c7b 100644 --- a/netwerk/base/src/nsProxyAutoConfig.js +++ b/netwerk/base/src/nsProxyAutoConfig.js @@ -108,7 +108,13 @@ nsProxyAutoConfig.prototype = { var mypac = pacUtils + pac; // evaluate loded js file evalInSandbox(mypac, ProxySandBox, pacURL); - ProxySandBox.myIP = dns.myIPAddress; + try { + ProxySandBox.myIP = dns.myIPAddress; + } catch (e) { + // Well, theres nothing better. + // see bugs 80363 and 92516. + ProxySandBox.myIP = "127.0.0.1"; + } LocalFindProxyForURL=ProxySandBox.FindProxyForURL; },