mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Subject:
Rhino SecurityException patch Date: Tue, 11 May 1999 12:25:50 -0400 From: Andrew Wason <aw@softcom.com> To: Norris Boyd <norris@netscape.com> Sorry if you aren't the right person to submit Rhino patches to. I couldn't get Rhino to run under JDK1.2 with a SecurityManager installed (e.g. java -Djava.security.manager=java.lang.SecurityManager). I understand the JavaAdapter stuff won't work - but I would still like to use Rhino without that piece. I've attached a small patch which catches and ignores the SecurityExceptions so that Rhino can run with a SecurityManager but without JavaAdapter. Andrew -- Andrew Wason SoftCom, Inc. aw@softcom.com
This commit is contained in:
parent
20f8852310
commit
a62a14d61d
@ -493,6 +493,12 @@ public final class Context {
|
||||
Class adapterClass = Class.forName(adapterName);
|
||||
ScriptableObject.defineClass(scope, adapterClass, sealed);
|
||||
} catch (ClassNotFoundException e) {
|
||||
} catch (SecurityException e) {
|
||||
// Ignore AccessControlExceptions that may occur if a
|
||||
// SecurityManager is installed:
|
||||
// java.lang.RuntimePermission createClassLoader
|
||||
// java.util.PropertyPermission
|
||||
// org.mozilla.javascript.JavaAdapter read
|
||||
}
|
||||
|
||||
// This creates the Packages and java package roots.
|
||||
|
@ -493,6 +493,12 @@ public final class Context {
|
||||
Class adapterClass = Class.forName(adapterName);
|
||||
ScriptableObject.defineClass(scope, adapterClass, sealed);
|
||||
} catch (ClassNotFoundException e) {
|
||||
} catch (SecurityException e) {
|
||||
// Ignore AccessControlExceptions that may occur if a
|
||||
// SecurityManager is installed:
|
||||
// java.lang.RuntimePermission createClassLoader
|
||||
// java.util.PropertyPermission
|
||||
// org.mozilla.javascript.JavaAdapter read
|
||||
}
|
||||
|
||||
// This creates the Packages and java package roots.
|
||||
|
Loading…
Reference in New Issue
Block a user