update core for recent js changes
[org.ibex.core.git] / src / org / ibex / net / HTTP.java
index 3c2d970..da94713 100644 (file)
@@ -718,7 +718,7 @@ public class HTTP {
             return ret;
         }
     
-        public static JSScope proxyAutoConfigRootScope = /*new ProxyAutoConfigRootScope();*/ null; // FIXME: New api
+        public static JS proxyAutoConfigRootScope = /*new ProxyAutoConfigRootScope();*/ null; // JS:FIXME: New api
         public static JS getProxyAutoConfigFunction(String url) {
             try { 
                 BufferedReader br = new BufferedReader(new InputStreamReader(new HTTP(url, true).GET()));
@@ -746,20 +746,21 @@ public class HTTP {
                 }
 
                 JS scr = JS.fromReader("PAC script at " + url, 0, new StringReader(script));
-                JS.cloneWithNewParentScope(scr, proxyAutoConfigRootScope).call(null, null, null, null, 0);
+                JS.cloneWithNewGlobalScope(scr, proxyAutoConfigRootScope).call(null, null, null, null, 0);
                 return (JS)proxyAutoConfigRootScope.get(JS.S("FindProxyForURL"));
             } catch (Exception e) {
                 if (Log.on) {
                     Log.info(Platform.class, "WPAD detection failed due to:");
-                    if (e instanceof JSExn) {
+                    // I have no idea what this was supposed to do
+                    /*if (e instanceof JSExn) {
                         try {
                             org.ibex.js.JSArray arr = new org.ibex.js.JSArray();
                             arr.addElement(((JSExn)e).getObject());
                         } catch (Exception e2) {
                             Log.info(Platform.class, e);
                         }
-                    }
-                    else Log.info(Platform.class, e);
+                    }*/
+                    Log.info(Platform.class, e);
                 }
                 return null;
             }