Commit Graph

224 Commits

Author SHA1 Message Date
norris%netscape.com
eb5865d934 Fix formatting. 1999-11-23 17:29:34 +00:00
norris%netscape.com
504a2557ce Fix test failures:
ecma_2/Exceptions/expression-020.js
js1_4/Regress/date-001-n.js
js1_4/Regress/toString-001-n.js
1999-11-22 23:48:06 +00:00
norris%netscape.com
ce59129ab9 Fix
Testcase ecma_2/Exceptions/expression-020.js failed
Failure messages were:
result = this.eval("NaN") (threw No exception thrown) = NaN FAILED! expected: Passed
1999-11-22 19:35:59 +00:00
norris%netscape.com
c6f15cb391 'thisArg' could be null, so use 'fun' for scope. 1999-11-22 19:35:20 +00:00
norris%netscape.com
865f66a07b Fix ecma_2/Expressions/instanceof-003-n.js
ScriptRuntime::instanceOf now needs a scope parameter that it can use to construct an exception object
1999-11-20 00:19:00 +00:00
norris%netscape.com
0a7318f579 argument.caller shouldn't be defined in the default version 1999-11-19 23:02:52 +00:00
rginda%netscape.com
57279e1a51 * Global.java
Cleared global.exitCode in quit() just to be safe.
* Main.java
  Adjusted exit code constants to match the js and xpcshells.
1999-11-17 20:26:17 +00:00
norris%netscape.com
b15e2970b0 Make -f semantics match those of the C engine. 1999-11-17 00:04:17 +00:00
norris%netscape.com
9e1cbbe40a Add contributor. 1999-11-16 23:58:11 +00:00
norris%netscape.com
a79f73f658 rginda's changes for having quit() take an exit code. 1999-11-16 23:57:23 +00:00
rogerl%netscape.com
a097356fa8 Removed NativeClosure 1999-11-09 18:24:40 +00:00
norris%netscape.com
e054a08198 Fix 18229: Bogus class file names being generated on Windows 1999-11-08 17:24:10 +00:00
norris%netscape.com
5d10d91ea2 Unify evaluation code to improve consistency and improve code size. 1999-11-05 22:18:24 +00:00
norris%netscape.com
4ad45bf1ec Remove JSuncaughtExceptionLine, use an error reporter to report line number info instead. 1999-11-05 21:48:05 +00:00
norris%netscape.com
634fa1c351 Improve performance of the non-error call code. 1999-11-05 21:23:10 +00:00
rogerl%netscape.com
6ab8568b72 Removed - not an ECMA thing and supplanted by a different mechanism. 1999-11-04 00:01:00 +00:00
rogerl%netscape.com
5d229c958c Fix back-reference parsing from going too far in source string 1999-11-04 00:00:14 +00:00
rogerl%netscape.com
dc6e27e8c1 Replaced Closure object with FunctionObject clone 1999-11-03 23:59:35 +00:00
rogerl%netscape.com
1c6d67c9a5 Removed NativeClosure 1999-11-03 23:58:51 +00:00
rogerl%netscape.com
c00cc220c6 Fix nested finally endless loop.
Replaced Closure object with FunctionObject clone.
1999-11-03 23:57:56 +00:00
rogerl%netscape.com
6bbeaa9db5 Add closure support 1999-11-03 23:56:28 +00:00
rogerl%netscape.com
dbb9b495e3 Removing NativeClosure 1999-11-03 23:55:59 +00:00
rogerl%netscape.com
20d55df771 Added Kurt Westerfeld's fix for 'undefined is not a function' message. 1999-11-02 22:52:10 +00:00
rogerl%netscape.com
6e901af5e4 More RegExp back reference specification mucking about. 1999-11-02 20:04:57 +00:00
rogerl%netscape.com
7a7398396f Fixed up for Java vs. ECMA definitions in edge cases 1999-11-02 20:04:16 +00:00
norris%netscape.com
f0b53fc5a9 Fix spelling of contributor's name. 1999-10-28 17:43:43 +00:00
rogerl%netscape.com
366a39bbe2 Error message for apply argument type 1999-10-27 22:17:44 +00:00
rogerl%netscape.com
59bbd1a9d3 ECMA handling of undefined args for call & apply. 1999-10-27 22:17:05 +00:00
rogerl%netscape.com
32feff141e Handle LINE & SOURCEFILE in dumpIcode
Fix bug in multiple try/catch clauses after a catch - the tryStackTop was
being decremented twice.
1999-10-27 22:16:15 +00:00
rogerl%netscape.com
a9a28082b7 Handle missing arg in match_or_replace 1999-10-27 22:14:46 +00:00
rogerl%netscape.com
15224ec833 ECMA specified handling of NaN inputs for max & min 1999-10-27 22:11:43 +00:00
rogerl%netscape.com
b0c98b8d85 Subsumed ConversionError into TypeError 1999-10-27 22:10:36 +00:00
norris%netscape.com
1f601534d6 Remove method duplication in NativeGlobal.
Add javadoc comments to EcmaError.
1999-10-26 17:22:23 +00:00
norris%netscape.com
75ae8940c1 Get filename and line number into uncaught exception reports. 1999-10-26 17:06:12 +00:00
norris%netscape.com
728f196c9d Add contributors. 1999-10-25 17:52:48 +00:00
norris%netscape.com
1e83296930 Add license text. 1999-10-25 17:41:49 +00:00
norris%netscape.com
a99ffc094a Add license boilerplate. 1999-10-25 17:36:20 +00:00
norris%netscape.com
0c4c8abe96 Should get ReferenceError exception for name not found. 1999-10-25 16:41:24 +00:00
norris%netscape.com
83dbb689c3 Add contributors. 1999-10-25 16:40:30 +00:00
beard%netscape.com
46b516f102 synched. 1999-10-22 22:39:51 +00:00
beard%netscape.com
cb627fa9be changed SharedGlobal.java to Global.java 1999-10-22 22:39:23 +00:00
norris%netscape.com
5f112b7933 Changes for improved errors-as-exceptions handling. 1999-10-22 22:02:58 +00:00
norris%netscape.com
ecae26d52e Use simpler, more widely applicable structure for global. Also avoids test failure for Function called as a function. 1999-10-22 22:00:21 +00:00
norris%netscape.com
b8da22d58f A NativeString object shouldn't be unwrapped to a primitive. 1999-10-22 21:58:54 +00:00
norris%netscape.com
2b172afa00 Fix formatting. 1999-10-22 16:58:30 +00:00
norris%netscape.com
c9c2bb3492 Fix javadoc 1999-10-22 16:56:56 +00:00
norris%netscape.com
aec69cc2f4 Fixed bug. We weren't loading classes in bottom-up dependency order.
Subject:
            Re: another getClassLoader exception
       Date:
            Mon, 18 Oct 1999 22:01:24 -0400
      From:
            Andrew Wason <aw@softcom.com>
        To:
            norris@netscape.com (Norris Boyd)
        CC:
            Howard Lin <howard@softcom.com>
 References:
            1 , 2




At 05:03 PM 10/18/99 -0700, Norris Boyd wrote:
>Are you still seeing this problem?


Yes.  I just did a CVS update to get the latest stuff and we still have
this problem.

I wrote a standalone sample program that duplicates the problem.  Run
JSSupport and you should get this exception:

defineClass org.mozilla.javascript.gen.c2
Exception in thread "main" java.lang.NoClassDefFoundError:
org/mozilla/javascript/gen/c1
         at java.lang.ClassLoader.resolveClass0(Native Method)
         at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
         at
JSSupport$MySecuritySupport$DataClassLoader.loadClass(JSSupport.java:89)
         at JSSupport$MySecuritySupport.defineClass(JSSupport.java:47)
         at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java,
Compiled Code)
         at org.mozilla.javascript.Context.compile(Context.java:1761)
         at org.mozilla.javascript.Context.compile(Context.java:1691)
         at org.mozilla.javascript.Context.compileReader(Context.java:810)
         at org.mozilla.javascript.Context.evaluateReader(Context.java:725)
         at org.mozilla.javascript.Context.evaluateString(Context.java:692)
         at JSSupport.<init>(JSSupport.java:20)
         at JSSupport.main(JSSupport.java:9)



Andrew



>--N
>
>Andrew Wason wrote:
>
> > At 04:54 PM 10/12/99 -0700, Norris Boyd wrote:
> > >I just checked in changes so that the class calling ScriptRuntime (c5
> in your
> > >case) will load the class itself using the normal Java classloading
> mechanism
> > >rather than an explicit call to the class loader. I pushed the bits up
> to the
> > >ftp site, but it takes a bit to propagate.
> >
> > I get this exception now (debugging statements are from my code):
> >
> > SecuritySupport.defineClass org.mozilla.javascript.gen.c5
> > DataClassLoader.loadClass org.mozilla.javascript.gen.c5
> > DataClassLoader.loadClass org.mozilla.javascript.gen.c4
> > using default loader com.softcom.realjava.PluginClassLoader@da9486a0
> > java.lang.NoClassDefFoundError: org/mozilla/javascript/gen/c4
> >          at java.lang.ClassLoader.resolveClass0(Native Method)
> >          at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
> >          at
> >
> com.softcom.realjava.plugins.RealJavaScript$RealJavaScriptSecuritySupport$Da
> > taClassLoader.loadClass(RealJavaScript.java:410)
> >          at
> >
> com.softcom.realjava.plugins.RealJavaScript$RealJavaScriptSecuritySupport.de
> > fineClass(RealJavaScript.java:352)
> >          at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java,
> > Compiled Code)
> >          at org.mozilla.javascript.Context.compile(Context.java:1761)
> >          at org.mozilla.javascript.Context.compile(Context.java:1691)
> >          at org.mozilla.javascript.Context.compileReader(Context.java:810)
> >
> > So when c5 is being loaded by my SecuritySupport, it also needs to load c4.
> > I decompiled org.mozilla.javascript.gen.c5 and it's constant pool
> > references CLASS org.mozilla.javascript.gen.c4, so c5 is dependent on c4
> > being loadable.  Is the problem that c5 is being loaded before the
> > optimizer has defined c4?
> >
> > I get the above exception for some classes and not others.  It seems
> > consistent that I always get it for classes with dependencies on other
> > optimizer classes that haven't been generated yet.
> >
> > Andrew
> >
> > --
> > Andrew Wason
> > SoftCom, Inc.
> > aw@softcom.com

--
Andrew Wason
SoftCom, Inc.
aw@softcom.com



   JSSupport.java

                  Name:
                         JSSupport.java
                   Type:
                         Java Source File (text/java)
                Encoding:
                         base64
1999-10-19 16:38:23 +00:00
norris%netscape.com
3700676b23 Fix following problem:
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
1999-10-12 23:54:03 +00:00
norris%netscape.com
809bf6aa85 Remove redundant import. 1999-10-12 21:46:50 +00:00
norris%netscape.com
bc2eb782ee Fix release date, add contributor. 1999-10-12 16:52:13 +00:00