diff --git a/mozilla/js/rhino/org/mozilla/javascript/Invoker.java b/mozilla/js/rhino/org/mozilla/javascript/Invoker.java index 3a07fda6180..ae9bd698cda 100644 --- a/mozilla/js/rhino/org/mozilla/javascript/Invoker.java +++ b/mozilla/js/rhino/org/mozilla/javascript/Invoker.java @@ -270,20 +270,8 @@ public abstract class Invoker { byte[] bytes = bos.toByteArray(); Context cx = Context.getCurrentContext(); - SecuritySupport ss = cx == null ? null : cx.getSecuritySupport(); - Class c; - if (ss != null) { - // This will be compiled using the security domain of the - // first class making a call. Then the result will be cached - // and used by subsequent calls (which may not necessarily - // be from the same security domain). Since Rhino generates - // the code, this shouldn't be a security hole. - Object securityDomain = cx.getSecurityDomainForStackDepth(-1); - c = ss.defineClass(className, bytes, securityDomain); - } else { - classLoader.defineClass(className, bytes); - c = classLoader.loadClass(className, true); - } + classLoader.defineClass(className, bytes); + Class c = classLoader.loadClass(className, true); result = (Invoker)c.newInstance(); if (false) { diff --git a/mozilla/js/rhino/src/org/mozilla/javascript/Invoker.java b/mozilla/js/rhino/src/org/mozilla/javascript/Invoker.java index 3a07fda6180..ae9bd698cda 100644 --- a/mozilla/js/rhino/src/org/mozilla/javascript/Invoker.java +++ b/mozilla/js/rhino/src/org/mozilla/javascript/Invoker.java @@ -270,20 +270,8 @@ public abstract class Invoker { byte[] bytes = bos.toByteArray(); Context cx = Context.getCurrentContext(); - SecuritySupport ss = cx == null ? null : cx.getSecuritySupport(); - Class c; - if (ss != null) { - // This will be compiled using the security domain of the - // first class making a call. Then the result will be cached - // and used by subsequent calls (which may not necessarily - // be from the same security domain). Since Rhino generates - // the code, this shouldn't be a security hole. - Object securityDomain = cx.getSecurityDomainForStackDepth(-1); - c = ss.defineClass(className, bytes, securityDomain); - } else { - classLoader.defineClass(className, bytes); - c = classLoader.loadClass(className, true); - } + classLoader.defineClass(className, bytes); + Class c = classLoader.loadClass(className, true); result = (Invoker)c.newInstance(); if (false) {