* fixed a typo that caused a warning (nsIsupports)
* fixed values of constants that caused warnings
* use a macro instead of assinging a long long value directly
r=jband
Subject:
another getClassLoader exception
Date:
Tue, 12 Oct 1999 10:39:26 -0400
From:
Andrew Wason <aw@softcom.com>
To:
norris@netscape.com (Norris Boyd)
CC:
Howard Lin <howard@softcom.com>
Norris,
It looks like the classes the optimizer generates call
ScriptRuntime.defineFunction which calls getClassLoader. This throws a
SecurityException.
java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader )
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
, Compiled Code)
at java.security.AccessController.checkPermission(AccessController.java,
Compiled Code)
at java.lang.SecurityManager.checkPermission(SecurityManager.java, Compiled
Code)
at java.lang.Class.getClassLoader(Class.java, Compiled Code)
at
org.mozilla.javascript.ScriptRuntime.defineFunction(ScriptRuntime.java:2045)
at org.mozilla.javascript.gen.c5.initScript(order.js)
at org.mozilla.javascript.gen.c5.exec(order.js)
at org.mozilla.javascript.Context.evaluateReader(Context.java:728)
[...]
Andrew
--
Andrew Wason
SoftCom, Inc.
aw@softcom.com
reviewed by Ben Goodger <rgoodger@ihug.co.nz> and Seth Spitzer <sspitzer@netscape.com>
Scripts running from chrome are considered super privileged and can perform operations that
scripts from the web cannot. I differentiate chrome scripts from web
scripts by considering all scripts loaded from chrome: URIs to be
privileged.
The problem I'm running into is that the loading of relative urls in
this code ends up going to the file: protocol (which is what the chrome
protocol is converted to internally). This change makes sure we load
from the chrome protocol so that the scripts are privileged and don't
get access errors. It's probably a good idea to load from the chrome
protocol anyway since it may one day be resolved to extracting from a
JAR file rather than accessing a discrete file.
event handlers can retreive the correct state of the form element. bug 15366; r=rods@netscape.com
Submit the form when a text field is clicked on only if the JavaScript event handler
has not consumed the event. bug 15949; r=rods@netscape.com
event handlers can retreive the correct state of the form element. bug 15366; r=rods@netscape.com
Submit the form when a text field is clicked on only if the JavaScript event handler
has not consumed the event. bug 15949; r=rods@netscape.com