4934 Commits

Author SHA1 Message Date
pschwartau%netscape.com
d5d842c70e Initial add. Regression test inspired by bug 188206.
git-svn-id: svn://10.0.0.236/trunk@136778 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-22 02:34:45 +00:00
pschwartau%netscape.com
676daf88fd Initial add. Regression test for bug 189898.
git-svn-id: svn://10.0.0.236/trunk@136750 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-21 21:23:20 +00:00
igor%mir2.org
805d7992de Patch from Christopher Oliver to fix http://bugzilla.mozilla.org/show_bug.cgi?id=189183
git-svn-id: svn://10.0.0.236/trunk@136673 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-20 15:09:45 +00:00
igor%mir2.org
acf5426893 Small fixes in links
git-svn-id: svn://10.0.0.236/trunk@136535 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-17 16:40:45 +00:00
brendan%mozilla.org
15e30e0232 Defend against bad EndMuxedDocument calls, and assert in the underlying {JS,PL}_DHashTableRawRemove that entry is live (188744, r=jrgm, sr=ben).
git-svn-id: svn://10.0.0.236/trunk@136501 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-17 10:01:50 +00:00
nboyd%atg.com
dc0c9665a7 UPdate to rc 3
git-svn-id: svn://10.0.0.236/trunk@136432 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-16 20:29:43 +00:00
igor%mir2.org
c985e591fb Note about scripting of classes from any class loader
git-svn-id: svn://10.0.0.236/trunk@136421 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-16 17:22:40 +00:00
nboyd%atg.com
5c52a77157 Add implmentation version date.
git-svn-id: svn://10.0.0.236/trunk@136414 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-16 14:24:03 +00:00
dougt%netscape.com
a2a82fab36 move nsTraceMalloc out of XPCOM. Factory out stackwalking code into new files. 189221 r=chak, 186585 r=blythe sr=dbaron. Most of this patch was contributed by seawood.
git-svn-id: svn://10.0.0.236/trunk@136371 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-15 20:40:06 +00:00
igor%mir2.org
efac8b9476 Committing patch from Steven Beal:
Have you considered adding a "Go" method to Main.java with
public visibility (same behavior as pressing the "Go" button in the debugger UI).

This would be a big help in a system where the debugger has been
embedded.  Being able to close the debugger and ensure that any
breakpoints were removed and any blocked threads notified would
be a nice feature.  Without this, closing the debugger can either
a) halt the application or b) destroy the debugger leaving blocked
threads in a permanent wait state.  Note that the debugger is
not actually destroyed in this case because the waiting threads
prevent it from being wholly GCed.


git-svn-id: svn://10.0.0.236/trunk@136360 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-15 10:42:56 +00:00
nboyd%atg.com
367237b2eb Update to R4.
git-svn-id: svn://10.0.0.236/trunk@136309 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-14 16:42:16 +00:00
igor%mir2.org
4ca10cb338 Fixing mnemonics shortcuts for Debug menu
git-svn-id: svn://10.0.0.236/trunk@136307 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-14 14:44:46 +00:00
igor%mir2.org
e1eab57c2a From Steaven Beal:
This looks like a simple case of using the Hashtable key
instead of the value...

    public void clearAllBreakpoints() {
        // Igor - Use of keys() is inappropriate here.  It produces
        // a ClassCastException on the assignment below.  The
        // keys are String instances, not SourceInfo instances...
        //
        //Enumeration e = sourceNames.keys();
        Enumeration e = sourceNames.elements();
	...
    }


git-svn-id: svn://10.0.0.236/trunk@136304 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-14 11:24:47 +00:00
dbaron%dbaron.org
4305a396ed Most of the changes needed for Mozilla to build with gcc's -pedantic-errors option. b=175423 r=seawood sr=bryner
git-svn-id: svn://10.0.0.236/trunk@136267 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-13 23:15:42 +00:00
pschwartau%netscape.com
9d85abdb7c Updating JS_GetImplementationVersion() to date of latest JS release (67111).
git-svn-id: svn://10.0.0.236/trunk@136186 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-11 02:05:00 +00:00
pschwartau%netscape.com
60056cf658 Removing skip since bug 83051 has been fixed.
git-svn-id: svn://10.0.0.236/trunk@136049 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-09 03:13:12 +00:00
pschwartau%netscape.com
da0a65f13f Improving comment.
git-svn-id: svn://10.0.0.236/trunk@136026 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-08 23:03:17 +00:00
pschwartau%netscape.com
e4631ab3d2 Adding a comment.
git-svn-id: svn://10.0.0.236/trunk@136025 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-08 23:01:43 +00:00
pschwartau%netscape.com
3b82ed70a1 Correcting testcase and adding more illustrative cases.
git-svn-id: svn://10.0.0.236/trunk@136024 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-08 22:51:02 +00:00
dbaron%dbaron.org
a53a959416 Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag
git-svn-id: svn://10.0.0.236/trunk@136009 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-08 21:07:51 +00:00
pschwartau%netscape.com
2486f3726f Adding comment.
git-svn-id: svn://10.0.0.236/trunk@135959 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-08 00:41:01 +00:00
brendan%mozilla.org
c4c7783814 Don't hold the GC lock when calling the GC callback (186592, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@135946 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-07 21:56:52 +00:00
pschwartau%netscape.com
cfb190d2cd Initial add. Regression test for bug 187133.
git-svn-id: svn://10.0.0.236/trunk@135904 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-06 22:18:34 +00:00
timeless%mozdev.org
4960240c75 Bug 187529 jsd init's a jscontext and doesn't release it (caught by res->input leak)
r=rginda sr=bryner


git-svn-id: svn://10.0.0.236/trunk@135849 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-04 22:47:44 +00:00
dbradley%netscape.com
d5e02d74fb Bug 184491 - Security Manager blocks invoking methods on some IDispatch based objects. r=adamlock, sr=jst
git-svn-id: svn://10.0.0.236/trunk@135817 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-03 15:48:20 +00:00
seawood%netscape.com
0a7c7a98f9 nobrainer changes while thinking about mingw support
Bug #134113 r=dmose


git-svn-id: svn://10.0.0.236/trunk@135809 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-03 08:58:59 +00:00
nboyd%atg.com
e0e95edda1 Update for RC2
git-svn-id: svn://10.0.0.236/trunk@135754 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-01 20:17:17 +00:00
igor%mir2.org
3262cffc0f Deprecating ClassOutput in favor of ClassRepository and Context methods to access ClassNameHelper functionality in favor of directly calling ClassNameHelper methods. For that I changed ClassNameHelper from interface to abstract class and added ClassNameHelper.get(Context cx) method to get name helper object that is used for the given Context object.
git-svn-id: svn://10.0.0.236/trunk@135737 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 18:21:32 +00:00
igor%mir2.org
b495cd03a1 Allow application to customize class loader used for loading generated code.
For that I added new method createClasssLoader to Context, which by default returns new instance of DefiningClassLoader and changed the code to use this method instead of creating DefiningClassLoader directly. I moved DefiningClassLoader to org.mozilla.javascript package so core Rhino classes would not depend on org.mozilla.classfile package. I also changed SecurityController.createClasssLoader to take additional parentLoader argument to explicitly specify which class loader should be parent for generated code.


git-svn-id: svn://10.0.0.236/trunk@135730 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-31 09:42:42 +00:00
igor%mir2.org
2ec8fc7016 Eliminating calls to Thread.getContextClassLoader().
From my mail to Norris Boyd:

When considering http://bugzilla.mozilla.org/show_bug.cgi?id=166530 I realized that my 2 years old suggestion to use Thread.getContextClassLoader() in org.mozilla.classfile.DefiningClassLoader was wrong, as it does not follow class loader chain pattern Rhino embeddings can use. Moreover, it is wrong to use Thread.getContextClassLoader() when searching for Rhino classes as if Rhino is available via the system class loader and an application uses its copy from another loader, Thread.getContextClassLoader() would return incompatible class while simple Class.forName() would do proper job of loading the requested class from a loader of Class.forName() caller.

The only place where Thread.getContextClassLoader() can be useful is when searching for classes in NativeJavaPackage, but even there with a new option to use Package with an explicit class loader argument it is not necessary as one can write in a script
Packages(java.lang.Thread.contextClassLoader) to get necessary behavior.


git-svn-id: svn://10.0.0.236/trunk@135711 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 18:22:58 +00:00
igor%mir2.org
7a60bfa650 Replace ScriptRuntime#main(String scriptClassName, String[] args) by ScriptRuntime#main(Class scriptClass, String[] args) and to optimizer.Codegen#generateMain code to generate call to Class.forName before calling ScriptRuntime#main. In this way script byte code can access Class object if generated script is loaded via different class loader then Rhino classes.
git-svn-id: svn://10.0.0.236/trunk@135695 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 06:49:10 +00:00
igor%mir2.org
1eae44d903 When checking for a nested class, try to load it from class loader for the parent class, not from the loader for Rhino classes.
git-svn-id: svn://10.0.0.236/trunk@135690 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 00:50:57 +00:00
igor%mir2.org
537ebbebd0 Move code to try to load a class from getPkgProperty to the separated findClass method and add catching of SecurityException there.
git-svn-id: svn://10.0.0.236/trunk@135689 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 00:49:11 +00:00
igor%mir2.org
9238213337 Change FunctionObject to extends BaseFunction, not NativeFunction as the later is more tailored for function representing JavaScript code.
git-svn-id: svn://10.0.0.236/trunk@135688 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-30 00:43:33 +00:00
igor%mir2.org
b4d957a36d To map a class name to the corresponding Class instance from the adapter code generate code to call Class.forName instead of calling ScriptRuntime.loadClassName so a class loader for the generated code will be used to access the Class instance, not the loader for the Rhino classes.
git-svn-id: svn://10.0.0.236/trunk@135684 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-29 20:21:06 +00:00
igor%mir2.org
18237dcd78 In createInvoker I replaced classLoader.loadClass by classLoader.linkClass to remove catching ClassNotFoundException
git-svn-id: svn://10.0.0.236/trunk@135682 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-29 10:52:10 +00:00
igor%mir2.org
ca16420186 Fixing design flaw in SecurityController:
The new SecurityController in its current form does not allow to define more then one generated class class in the same class loader effectively preventing to use optimizer which needs to define classes that refer each other and should be defined in the same loader.

To fix this I replaced the defineClass method in SecurityController by
    public GeneratedClassLoader createClassLoader(Object securityDomain);
which returns instance of the new GeneratedClassLoader interface which can be used to define several classes. I also made DefiningClassLoader to implement this interface to simplify code in JavaAdapter.java and optimizer/Codegen.java.


git-svn-id: svn://10.0.0.236/trunk@135668 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-28 05:37:43 +00:00
seawood%netscape.com
f8f86e7f05 Start installing GRE libraries & components into a separate dist/gre directory as part of the default build.
Bug #186241 r=dougt


git-svn-id: svn://10.0.0.236/trunk@135661 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-28 01:15:07 +00:00
igor%mir2.org
ca96f33b4c Preparations for 1.5R4 release
git-svn-id: svn://10.0.0.236/trunk@135603 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-24 01:34:45 +00:00
igor%mir2.org
ff75833db8 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=184107
Always put function expression statements into initial activation object ignoring the with statement to follow SpiderMonkey


git-svn-id: svn://10.0.0.236/trunk@135592 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-23 15:01:53 +00:00
igor%mir2.org
8da562678c Mostly cosmetics: use consistent naming for new API for function object initialization.
git-svn-id: svn://10.0.0.236/trunk@135591 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-23 14:56:58 +00:00
igor%mir2.org
b8d1156a30 Eliminate double creation of Function objects representing nested functions in scripts/functions and use ScriptRutime.putFunction to bind function objects with activation scope.
git-svn-id: svn://10.0.0.236/trunk@135576 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-22 22:39:10 +00:00
igor%mir2.org
f643a85175 Use Context.enter() try { } finally { Context.exit() } instead of try { Context.enter() } finally { Context.exit() } as Context.exit should only be called if Context.enter() returns successfully.
git-svn-id: svn://10.0.0.236/trunk@135573 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-22 19:12:50 +00:00
igor%mir2.org
613922e569 Move code to put functions as properties of activation object to ScriptRuntime.putFunction so it can reused by optimizer.
git-svn-id: svn://10.0.0.236/trunk@135572 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-22 19:08:52 +00:00
igor%mir2.org
02a3104fd2 Do not put "anonymous" into BaseFunction.functionName for functions created via new Function. Instead NativeFunction.getFunctionName() returns "anonymous" for function name for such functions which allows to assume that BaseFunction.functionName always holds real name.
git-svn-id: svn://10.0.0.236/trunk@135571 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-22 19:06:26 +00:00
igor%mir2.org
f1b2ffe463 I replaced exception handlers for InstantiationException and friends during Class/Constructor.newInstance calls to construct NativeFunction/NativeScript instances via single catch (Exception ex) as the handlers rethrow exceptions as RuntimeException in any case. As it reduces OptRuntime.newOptFunction to few lines, its single usage in Codegen is inlined.
git-svn-id: svn://10.0.0.236/trunk@135563 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-22 02:51:16 +00:00
igor%mir2.org
0d3a09f775 I removed constants denoting _QUICK bytecodes as valid bytecode can not contain them. To catch possible bugs with passing invalid opcode I also replaced extra, opcodeCount and stackChange arrays by functions with switch statements that throws IllegalArgumentException on bad opcode. It also has an advantage of reducing class file size due to lack of support in JVM for efficient array initialization.
git-svn-id: svn://10.0.0.236/trunk@135562 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-22 02:42:40 +00:00
igor%mir2.org
9bf6180e3f I removed dependency of Parser.decompile on NativeFunction. Now Parser.decompile takes as argument a tree structure describing encoded source for script or function and their nested functions. In case of interpreter the tree is built from interpreter runtime data while the optimizer puts a static function to construct tree into the class file representing compiled script or function. This function is called via reflection.
The change removes the need to have instances of NativeFunction representing nested functions constructed before they are needed as a part of script execution.


git-svn-id: svn://10.0.0.236/trunk@135545 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-21 12:43:55 +00:00
brendan%mozilla.org
c339a9649c Fixed so overriding Function.prototype.toSource doesn't mess up F.p.toString output, which should decompile the function, including nested function expressions (178389, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@135535 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-21 02:14:53 +00:00
igor%mir2.org
7e75720a44 I removed code to add EmptyArray field to generated field in Codegen.generateInit as it was redundant to ScriptRuntime.emptyArgs
git-svn-id: svn://10.0.0.236/trunk@135525 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-20 16:14:51 +00:00