Commit Graph

179 Commits

Author SHA1 Message Date
igor%mir2.org
20d9c33ab6 Work for bug 261278: splitting STRICT_MODE into STRICT_VARS and STRICT_EVAL to allow for better compatibility in future if strictness would be exetended to other areas. 2004-10-28 14:13:05 +00:00
igor%mir2.org
ab4159c06b Compatiblility with Rhno+Continuations fork: added Main.setSize(Dimension) 2004-10-15 20:06:22 +00:00
igor%mir2.org
7a7538ee75 Compatibility change: allow to use Context.enter/exit when thread already has associated Context with factory. 2004-10-15 18:34:24 +00:00
igor%mir2.org
011d77d870 Compatibility with Cocoon and its usage of Rhino debugger. 2004-10-14 09:15:19 +00:00
igor%mir2.org
83a78ee629 Work on bug 258844: Continuation by default 2004-10-09 22:07:04 +00:00
igor%mir2.org
438bd2230e Fixing bug 262687: patch from Kurt Huwig, bugzilla@huwig.de , to make the source compatible with JDK 1.5. 2004-10-03 11:23:07 +00:00
igor%mir2.org
2208dc8f95 RUnit Software AS as the single owner of copyrights for the following list of files present in Mozilla CVS as of 2004-10-01 15:10 UTC changes the license of the files to NPL/GPL. This is done for consistency with the rest of the source code in Rhino.
List of the affected files:

mozilla/js/rhino/src/org/mozilla/javascript/Callable.java
mozilla/js/rhino/src/org/mozilla/javascript/ClassCache.java
mozilla/js/rhino/src/org/mozilla/javascript/CompilerEnvirons.java
mozilla/js/rhino/src/org/mozilla/javascript/ContextAction.java
mozilla/js/rhino/src/org/mozilla/javascript/ContextFactory.java
mozilla/js/rhino/src/org/mozilla/javascript/Kit.java
mozilla/js/rhino/src/org/mozilla/javascript/Reference.java
mozilla/js/rhino/src/org/mozilla/javascript/SpecialRef.java
mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/GuiCallback.java
mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/test.js
mozilla/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLReference.java

Please contact igor@runitsoft.com if you have any questions about this.
2004-10-01 15:11:01 +00:00
igor%mir2.org
dfa85f90dd 1. I fixed a recent regression that caused "arguments" array to be constructed before initialization of standard objects: Global.init() should be called in procesFiles as well.
2. I replaced a couple of anonymous classes implementing ContextAction by Use single IProxy class to shrink compiled code size.
2004-09-29 05:41:00 +00:00
igor%mir2.org
31962091d1 Store optimization level and language version in ShellContextFactory
so all Context instances created on other threads or from JavaAdapter
calls would have proper setup.
2004-09-28 21:58:01 +00:00
igor%mir2.org
744bc2b079 Allow to specify explicit ContextFactory with the debugger. 2004-09-24 20:35:42 +00:00
igor%mir2.org
9c900143cf Make sure that all functionality that Main.(main|mainEmbedded) use to initialize debug GUI is available for applications through public methods. 2004-09-24 16:46:50 +00:00
igor%mir2.org
243ce99e7c More compatibility changes: added Main.isVisible 2004-09-24 16:38:09 +00:00
igor%mir2.org
7523c5c791 Added few methods to redirect calls from main to DebugGui for compatibility. 2004-09-24 16:14:02 +00:00
igor%mir2.org
49a53cd5e9 Resolving bug 261278: strict mode implementation 2004-09-23 21:34:22 +00:00
igor%mir2.org
c4916822f7 Resolving bug 258844: implementation of continuation support for Rhino interpreter inspired by Christopher Oliver work for custom Rhino version for cocoon.apache.org. 2004-09-16 18:27:42 +00:00
igor%mir2.org
a30abea90c 1. Using explicit ShellContextFactory in shell to avoid interference from changes in global ContextFactory.
2. Initializing global scope before the first execution to allow to customize ShellContextFactory before calls to Context.initStandardObjects()
2004-09-15 16:00:30 +00:00
igor%mir2.org
91f7a07a68 1. Call contextData.pushFrame(this) from StackFrame.onEnter and not from StackFrame.constructor to allow multiple invocations of enter/exit per single debug frame. The continuation support will use it.
2. Expand tabs
2004-09-15 14:59:36 +00:00
igor%mir2.org
b92c21f853 1. Ignoring recursive invocation of Dim.interrupted on event thread: when Gui
processes breakpoint hit and another breakpoint is met during event processing,
then on Linux recursive invocations of EventQueue.getNextEvent()/dispatchEvent
lead to eventual GUI deadlock. It is easy to observe when the break on function
enter is enabled and a JS function is called that is attached to an action
handler of some button. With recursive bahaviour repeated clicks lead to deeper
and deeper invocation of EventQueue.getNextEvent() and GUI deadlock on Linux.

So to improve debugger stubility I modify Dim.interrupted to ignore calls from
event thread when another invocation of Dim.interrupted already waits for GUI
result.

2. To decrease class and jar bloat I merges various implementations of Runnable
and and other interfaces to single class with switch dispatch. It saved about
6K from js.jar.
2004-09-15 14:45:10 +00:00
igor%mir2.org
985134c0ed 1. Replacing IdScriptableObject.wrap_* methods by their ScriptRuntime.wrap* counterparts since the wrap methods are useful not only for subclasses of IdScriptableObject.
2. Reorganizing execIdCall in few classes inherited from IdScriptableObject to shrink code size.
2004-09-10 18:02:06 +00:00
igor%mir2.org
db8822eccc Removal of "throws JavaSriptException" declaration:
JavaSriptException now inherits from RhinoException which inherits from RuntimeException and as such it does not necessary to declare it.

Moreover, it is wrong to use it for the documentation purpose since a  script can also throw EcmaError and WrappedException and a proper documentation would require to document those exceptions as well. But since almost all Rhino functions can potentially execute script code it means that wast majority of functions would bear the declarations, not only code overriding or calling explicitly Function.call/construct. And then the throw declarations would bring no information if it always would be "throws RhinoException". Thus it is better not to litter sources with the declarations at all.
2004-09-08 12:29:59 +00:00
igor%mir2.org
30e63c4179 Fixing bug 258144: my take on patch patch from Andrew Madigan <andymadigan@yahoo.com> to add class compiler option controlling which class will be used for main method implementation. 2004-09-07 19:11:39 +00:00
igor%mir2.org
c7b18deb40 Deprecating PropertyException as a part of common exception root changes, see 244492. 2004-08-14 16:45:30 +00:00
igor%mir2.org
eed65b7987 Using Kit.initCause to wrap the original exception preventing creation of SecurityController class. 2004-08-14 16:42:33 +00:00
igor%mir2.org
8a6fdf912e Fixing missed context wrapping in debugger/Dim and proper button enable/dosable in debugger/DebugGui 2004-07-29 12:51:35 +00:00
igor%mir2.org
43d1beb31a Renaming StringIdMap to Main and ipdating documentation 2004-07-29 10:44:59 +00:00
igor%mir2.org
0659e0b714 Committing E4X parser and runtime proxies: see enhancement report 242805.
This is based on code contributed to Rhino by AgileDelta, Inc, www.agiledelta.com and in particular by

Ethan Hugg
Terry Lucas
Milen Nankov
John Schneider

Thanks!
2004-07-28 21:11:02 +00:00
igor%mir2.org
f32fceb8a1 Deprecation of ContextListener in favour of ContextFactory.Listener:
the later is stored in the factory and not in static variables.
For compatibility an instance of ContextFactory stored in static variables
is used to provide support for old Context.addContextListener etc. API.

The static instance of the factory is also used by Context.enter to create
Context instances providing simple way to customize Context: one just need
to initialize the global static factory.
2004-06-30 15:23:39 +00:00
igor%mir2.org
012fd05901 Fix menu enable/disable misbehavior. 2004-06-30 13:29:41 +00:00
igor%mir2.org
4cc8c9cd28 Fixing JDK 1.3 compatibility: TableModel.getRot() should not return null there. 2004-06-30 09:38:54 +00:00
igor%mir2.org
b538849b5b Work on bug 244492: RhinoException is the new common base class for all exceptions. 2004-06-07 16:40:28 +00:00
igor%mir2.org
daf6b75edb Introduction of ContextAction interface as a safe alternative for Context.enter/Context.exit. All usages of Context.enter/Context.exit in Rhino are replaced by
Context.call(new ContextAction() {
	public Object run(Context cx) { ... }
});
or similar alternatives.

It prevents bugs with missed Context.exit and provides room for optimization of Context association with current thread and simplify implementation of safe environment for execution of untrusted applets and scripts.

In addition, Rhino now supports global SecurityController that take precedence over any per/Context controllers so the application can setup the controller once and for all.
2004-06-06 15:33:59 +00:00
igor%mir2.org
6dcea14f54 Patch from Merten Schumman <Merten.Schumman@asg.com> to add Main.mainEmbedded(String) which is a version of Main.main without System.in/err/out redirection. It simplifies life for embeddings. 2004-05-28 14:19:11 +00:00
igor%mir2.org
402fd02406 Final implementation of GUI/debug implementation internals separation. Now the newly introduced Dim.java (Dim: Debug IMplementation) depends only on GuiCallback and contains all iteractions with Rhino. 2004-05-27 11:26:59 +00:00
igor%mir2.org
7fe01ad6bc exitAction is moved to DebugGui 2004-05-27 10:34:44 +00:00
igor%mir2.org
cd63019db8 Prepare to remove dependancy of core debugger implementation on GUI: introduction of GuiCallback interface that DebugGui implements. 2004-05-27 10:21:24 +00:00
igor%mir2.org
b85ecb8c02 Work on 244492: JavaScriptException extends RuntimeException 2004-05-26 11:54:10 +00:00
igor%mir2.org
1e8e9be624 1. Reorganize debugger to move all code that interacts with the engine into Main.java while all GUI logic now presents in DebugGui
2. Move downloaded files for swing tree table into downloaded directory and adjust build files accordingly.
2004-05-23 16:15:09 +00:00
igor%mir2.org
cfe01facb2 Make sure that for Rhino-generated exceptions Throwable.getMessage() contains script file and line information. 2004-05-23 14:32:07 +00:00
igor%mir2.org
30e9aee832 Switch to line info extraction through single top script processing 2004-05-22 23:19:56 +00:00
igor%mir2.org
677ac1cd76 Splitting Main.java into Main.java and GUI-related DebugGui.java 2004-05-21 15:06:36 +00:00
igor%mir2.org
7ceadc8e69 Split Main class into Main and DebugGui to have better debugger/gui separation 2004-05-21 14:25:21 +00:00
igor%mir2.org
1ad8dc2197 Move all logic to open source window at the end of compilation to single update action. 2004-05-21 12:04:47 +00:00
igor%mir2.org
e58d2a671b Move logic to show exception dialog into EnterInterrupt action 2004-05-21 11:27:59 +00:00
igor%mir2.org
7706f20db2 Test file 2004-05-21 10:53:19 +00:00
igor%mir2.org
5c690d13af I changed StackFrame.onLineChange to access breakFlag directly which allowed to remove global context hashtable 2004-05-21 01:20:48 +00:00
igor%mir2.org
261666150e Merge various GUI initializations during breakpoint hit into single action 2004-05-21 01:10:04 +00:00
igor%mir2.org
0ec2c999de Removal of manThread: breakFlag can do its job just fine 2004-05-21 00:17:45 +00:00
igor%mir2.org
9f73c42235 Replace Context switching during eval for interrupted threads by thread communication so all evals happens on the original thread. 2004-05-21 00:11:24 +00:00
igor%mir2.org
f4ff06f911 Making BaseFunction.decompile package private: any new public function will always find its users even if the usage is broken. It was public to allow calls from debugger but simple call to Context.toString() would do the same job. 2004-03-18 13:37:29 +00:00
igor%mir2.org
b629e258d7 optimizer.ClassCompiler provides new simple API for generating of class files from scripts that does not require to create Context instances.
The jsc tool is updated to use the new interface instead of using ClassNamehelper and friends.
2004-01-17 21:02:32 +00:00