The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search

Change Log for Significant Rhino Changes

This is a log of significant changes to Rhino since the initial release to open source (1.4 Release 3). Bug fixes won't be mentioned here, just API changes or significant functionality changes.

Changes since Rhino 1.4 Release 3

Compilation mode

Since 1.4R3, Rhino has two modes of execution available. The familiar interpretive mode has an interpreter loop implemented in Java. The new compilation mode compiles JavaScript code to Java bytecodes in class files. This compilation can be done as part of script evaluation using the same APIs already available for the interpreter, or in a separate compile-time step. The code for the interpreter is located in the org.mozilla.javascript.optimizer package.
 

jsc

The distribution now contains an extra class that can be invoked from the command line. This is jsc, the JavaScript Compiler. This tool can be used to create Java classes from JavaScript. Options exist to allow creation of Java classes that implement arbitrary interfaces and extend arbitrary base classes, allowing JavaScript scripts to implement important protocols like applets and servlets. See http://www.mozilla.org/rhino/jsc.html.
 

LC3

Rhino now supports the LiveConnect 3 specification. The most notable change is support for overloaded method resolution. See LiveConnect Release 3 Goals/Features.
 

JavaBeans properties reflected as Java properties

Java classes with getFoo/setFoo methods will have a "foo" property in the JavaScript reflection.
 

New semantics for ScriptableObject.defineClass

The old rules for defining JavaScript objects using a Java class were getting baroque. Those rules are still supported, but a cleaner definition is now supported. See the javadoc for details.
 

Support for the Java 2 -jar option

It's now possible to start the shell using the new -jar option in Java 2.
 

Shell changes

Two changes here: addition of the "environment" and "history" top-level variables.
 

Java classes visible to scripts

An attendee at JavaOne raised the point that many embeddings may not want scripts to be able to access all Java classes. This is an excellent point, and I've implemented an addition to the SecuritySupport interface that allows embedders to choose which classes are exposed to scripts.
 

SecuritySupport and JavaAdapter

Andrew Wason pointed a problem with the new JavaAdapter feature (which allows JavaScript objects to implement arbitrary Java interfaces by generating class files). It didn't support the SecuritySupport interface, which allows Rhino to delegate the creation of classes from byte arrays to a routine provided by the embedding. This ability is important from a security standpoint because class creation is considered a privileged action.

I've checked in changes that fix this problem. If a SecuritySupport class is specified when a Context is created, uses of JavaAdapter will will delegate class creation to the SecuritySupport class.
 

Context.exit()

Context.exit() has been changed from an instance method to a static method. This makes it match the Context.enter() method, which is also static. See the javadoc for more information on its operation.
 

Context.enter(Context)

A new overloaded form of Context.enter has been added. Without the addition of this method it was not possible to attach an existing context to a thread. See the javadoc for more information on its operation.
 

Listeners for Context

Context now supports property change listeners for a couple of its properties.



back to top

Copyright © 1998-1999 The Mozilla Organization.
Last modified September 28, 1999.