Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency org.mozilla:rhino to v1.7.15 #75

Draft
wants to merge 1 commit into
base: helma-🐜
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Aug 27, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
org.mozilla:rhino (source) 1.7.13 -> 1.7.15 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

mozilla/rhino (org.mozilla:rhino)

v1.7.15

May 3, 2024

Highlights of this release include:

  • Basic support for "rest parameters"
  • Improvements in Unicode support
  • "Symbol.species" implemented in many places
  • More correct property ordering in many places
  • And many more improvements and bug fixes

This release includes committs from 29 different committers. Thanks to you all for your help!

v1.7.14

January 6, 2022


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@p3k
Copy link
Member

p3k commented Aug 27, 2023

Copied from #39 (comment):

Currently throwing exception trying to access cleanly installed welcome app:

[ERROR] [welcome-1] GET:favicon.ico org.mozilla.javascript.EvaluatorException: Wrapped java.lang.NullPointerException (/Users/tobi/Desktop/helma/modules/tools/Global/helma.Inspector.js#304)
org.mozilla.javascript.EvaluatorException: Wrapped java.lang.NullPointerException (/Users/tobi/Desktop/helma/modules/tools/Global/helma.Inspector.js#304)
        at helma.scripting.rhino.RhinoCore.getValidPrototype(RhinoCore.java:448)
        at helma.scripting.rhino.RhinoCore.getNodeWrapper(RhinoCore.java:695)
        at helma.scripting.rhino.RhinoCore$WrapMaker.wrap(RhinoCore.java:1136)
        at org.mozilla.javascript.ScriptRuntime.toObject(ScriptRuntime.java:1258)
        at org.mozilla.javascript.ScriptRuntime.toObject(ScriptRuntime.java:1176)
        at org.mozilla.javascript.Context.toObject(Context.java:1640)
        at helma.scripting.rhino.RhinoEngine.setGlobals(RhinoEngine.java:203)
        at helma.framework.core.RequestEvaluator.initGlobals(RequestEvaluator.java:1008)
        at helma.framework.core.RequestEvaluator.run(RequestEvaluator.java:222)
        at java.base/java.lang.Thread.run(Thread.java:829)

@p3k p3k added the needs-work label Aug 27, 2023
@renovate renovate bot changed the title fix(deps): update dependency org.mozilla:rhino to v1.7.14 Update dependency org.mozilla:rhino to v1.7.14 Aug 28, 2023
@p3k p3k added core dependency Pull request that updates a dependency file labels Aug 28, 2023
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from 025c96c to 2d24670 Compare December 30, 2023 14:12
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch 2 times, most recently from 2b5d34a to b41c1b2 Compare January 9, 2024 08:34
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from b41c1b2 to fe7bad0 Compare May 4, 2024 05:25
@renovate renovate bot changed the title Update dependency org.mozilla:rhino to v1.7.14 Update dependency org.mozilla:rhino to v1.7.15 May 4, 2024
@p3k
Copy link
Member

p3k commented May 18, 2024

The Rhino commit causing the exception is mozilla/rhino@73a8b29 – found via git bisect.

A work-around is patching MemberBox.java with an NP check:

diff --git a/src/org/mozilla/javascript/MemberBox.java b/src/org/mozilla/javascript/MemberBox.java
index a24d4743..e97a2811 100644
--- a/src/org/mozilla/javascript/MemberBox.java
+++ b/src/org/mozilla/javascript/MemberBox.java
@@ -202,10 +202,13 @@ final class MemberBox implements Serializable {
         if (target instanceof Delegator) {
             target = ((Delegator) target).getDelegee();
         }
-        for (int i = 0; i < args.length; ++i) {
-            if (args[i] instanceof Delegator) {
-                args[i] = ((Delegator) args[i]).getDelegee();
-            }
+
+        if (args != null) {
+          for (int i = 0; i < args.length; ++i) {
+              if (args[i] instanceof Delegator) {
+                  args[i] = ((Delegator) args[i]).getDelegee();
+              }
+          }
         }
 
         try {

@p3k
Copy link
Member

p3k commented May 18, 2024

Digging deeper, there is a weird inconsistency between Context.emptyArgs and ScriptRuntime.emptyArgs: although the former is set to the latter in Context.java and ScriptRuntime.java, resp., both are not the same in JavaMembers.java:

// Context.java
public static final Object[] emptyArgs = ScriptRuntime.emptyArgs;

// ScriptRuntime.java
public static final Object[] emptyArgs = new Object[0];

// JavaMembers.java
rval = bp.getter.invoke(javaObject, Context.emptyArgs);
// Context.emptyArgs != ScriptRuntime.emptyArgs 🤷 

At this point, Context.emptyArgs is indeed null, while ScriptRuntime.emptyArgs is not! This can be used as an alternative work-around here:

diff --git a/src/org/mozilla/javascript/JavaMembers.java b/src/org/mozilla/javascript/JavaMembers.java
index f9c457b0..58fc8f3b 100644
--- a/src/org/mozilla/javascript/JavaMembers.java
+++ b/src/org/mozilla/javascript/JavaMembers.java
@@ -100,7 +100,7 @@ class JavaMembers {
             if (member instanceof BeanProperty) {
                 BeanProperty bp = (BeanProperty) member;
                 if (bp.getter == null) return Scriptable.NOT_FOUND;
-                rval = bp.getter.invoke(javaObject, Context.emptyArgs);
+                rval = bp.getter.invoke(javaObject, ScriptRuntime.emptyArgs);
                 type = bp.getter.method().getReturnType();
             } else {
                 Field field = (Field) member;

It begs the question if this is a Rhino issue, or if there is some Helma code causing this…

@p3k p3k force-pushed the helma- branch 2 times, most recently from bd2c103 to b8abe5a Compare May 18, 2024 14:47
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from d231fd8 to adecb51 Compare May 18, 2024 20:11
@p3k p3k force-pushed the helma- branch 7 times, most recently from 61c4440 to daf8da6 Compare May 18, 2024 23:23
@p3k p3k self-assigned this May 25, 2024
@p3k p3k marked this pull request as draft May 25, 2024 15:44
@p3k p3k force-pushed the helma- branch 2 times, most recently from bb72f3f to ebf9b22 Compare May 25, 2024 17:34
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from da985c7 to 03c5b63 Compare June 1, 2024 16:10
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from 03c5b63 to 5e6ee68 Compare June 1, 2024 16:19
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from 5e6ee68 to a34dd7f Compare June 1, 2024 16:21
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from a34dd7f to 4635578 Compare June 1, 2024 16:22
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from 4635578 to a3d074b Compare June 1, 2024 16:23
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from a3d074b to dc16b50 Compare June 1, 2024 16:27
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from dc16b50 to 526235b Compare June 1, 2024 16:35
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from 526235b to 77dde4a Compare June 1, 2024 16:38
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from 77dde4a to 57013f8 Compare June 1, 2024 16:42
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from 57013f8 to d1c9373 Compare June 1, 2024 16:49
@p3k p3k force-pushed the helma- branch 3 times, most recently from 892ac82 to 85f6102 Compare June 1, 2024 17:06
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from d1c9373 to 434c535 Compare June 1, 2024 17:06
@p3k p3k force-pushed the helma- branch 3 times, most recently from 24be038 to f2feef4 Compare June 1, 2024 20:29
@p3k p3k force-pushed the helma- branch 2 times, most recently from d1ddce0 to 5de4616 Compare June 15, 2024 19:37
@renovate renovate bot force-pushed the renovate/org.mozilla-rhino-1.x branch from 434c535 to 3b5a454 Compare June 17, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core dependency Pull request that updates a dependency file needs-work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant