Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

permissions: read-all

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The current release is <a href="https://github.com/mozilla/rhino/releases/tag/Rh

<details><summary>Releases</summary>
<table>
<tr><td><a href="https://github.com/mozilla/rhino/releases/tag/Rhino1_9_1_Release">Rhino 1.9.1</a></td><td>February 15, 2026</td></tr>
<tr><td><a href="https://github.com/mozilla/rhino/releases/tag/Rhino1_9_0_Release">Rhino 1.9.0</a></td><td>December 22, 2025</td></tr>
<tr><td><a href="https://github.com/mozilla/rhino/releases/tag/Rhino1_8_1_Release">Rhino 1.8.1</a></td><td>December 2, 2025</td></tr>
<tr><td><a href="https://github.com/mozilla/rhino/releases/tag/Rhino1_8_0_Release">Rhino 1.8.0</a></td><td>January 2, 2025</td></tr>
Expand Down Expand Up @@ -132,7 +133,7 @@ this using the command:
./gradlew -q javaToolchains

Not all installers seem to put JDKs in the places where Gradle can find them. When in doubt,
installatioons from [Adoptium](https://adoptium.net) seem to work on most platforms.
installations from [Adoptium](https://adoptium.net) seem to work on most platforms.

### Testing on Android

Expand Down
12 changes: 12 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Rhino 1.9.1
## February 15, 2026

This release fixes a few small regressions introduced in Rhino 1.9.0.

* Ensure that the "global" object is present, necessary for core-js to run
* Prevent compiled methods from introducing illegal characters in their names
* Support reserved words like "class" as names of XML attributes
* Fix a performance regression in the RegExp engine.

Thanks to all who contributed!

# Rhino 1.9.0
## December 22, 2025

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rootProject.name=rhino-root
group=org.mozilla
version=1.9.0
version=1.9.1-PATCHED
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted

mavenReleaseRepo=https://oss.sonatype.org/service/local/staging/deploy/maven2/
mavenSnapshotRepo=https://oss.sonatype.org/content/repositories/snapshots
githubPackagesRepo=https://maven.pkg.github.com/mozilla/rhino
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.mozilla.javascript.Callable;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ContextAction;
import org.mozilla.javascript.ContextFactory;
import org.mozilla.javascript.ImporterTopLevel;
import org.mozilla.javascript.Kit;
import org.mozilla.javascript.NativeCall;
import org.mozilla.javascript.NativeObject;
import org.mozilla.javascript.Script;
import org.mozilla.javascript.ScriptRuntime;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ScriptableObject;
Expand Down Expand Up @@ -745,8 +745,15 @@ private static String do_eval(Context cx, StackFrame frame, String expr) {
cx.setInterpretedMode(false);
cx.setGeneratingDebug(false);
try {
Callable script = (Callable) cx.compileString(expr, "", 0, null);
Object result = script.call(cx, frame.scope, frame.thisObj, ScriptRuntime.emptyArgs);
Scriptable scope = frame.scope;
if (!frame.isFunction && scope != null) {
Scriptable parentScope = scope.getParentScope();
if (parentScope != null) {
scope = parentScope;
}
}
Script script = cx.compileString(expr, "", 0, null);
Object result = script.exec(cx, scope, frame.thisObj);
if (result == Undefined.instance) {
resultString = "";
} else {
Expand Down Expand Up @@ -896,7 +903,7 @@ public DebugFrame getFrame(Context cx, DebuggableScript fnOrScript) {
// Can not debug if source is not available
return null;
}
return new StackFrame(cx, dim, item);
return new StackFrame(cx, dim, item, fnOrScript.isFunction());
}

/** Called when compilation is finished. */
Expand Down Expand Up @@ -974,6 +981,9 @@ public static class StackFrame implements DebugFrame {
/** The 'this' object. */
private Scriptable thisObj;

/** Whether this frame represents a function (vs a top-level script). */
private boolean isFunction;

/** Information about the function. */
private FunctionSource fsource;

Expand All @@ -984,10 +994,11 @@ public static class StackFrame implements DebugFrame {
private int lineNumber;

/** Creates a new StackFrame. */
private StackFrame(Context cx, Dim dim, FunctionSource fsource) {
private StackFrame(Context cx, Dim dim, FunctionSource fsource, boolean isFunction) {
this.dim = dim;
this.contextData = ContextData.get(cx);
this.fsource = fsource;
this.isFunction = isFunction;
this.breakpoints = fsource.sourceInfo().breakpoints;
this.lineNumber = fsource.firstLine();
}
Expand Down
Loading