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

NativeError: Add ES2022 cause #1570

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Conversation

camnwalter
Copy link
Contributor

This fixes a couple other test cases involving toString() as well. cause_abrupt fails because it requires Proxy.

As mentioned in #1091 (comment), I haven't changed toSource(), but I can add that functionality if that is wanted.

Resolves #1091

obj.setAttributes("cause", DONTENUM);
}
} else {
ScriptableObject.putProperty(obj, "fileName", ScriptRuntime.toString(args[1]));
Copy link
Contributor Author

@camnwalter camnwalter Aug 21, 2024

Choose a reason for hiding this comment

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

Suggested change
ScriptableObject.putProperty(obj, "fileName", ScriptRuntime.toString(args[1]));
ScriptableObject.putProperty(obj, "fileName", args[1]);

I changed this to convert the fileName argument to a string, which is what it looks like it does in Firefox but I can revert this back since it's a breaking change.

@p-bakker
Copy link
Collaborator

The CI pipeline fails due to formatting issues, see https://github.com/mozilla/rhino/actions/runs/10482059063/job/29037139925?pr=1570

@camnwalter
Copy link
Contributor Author

Huh, I will fix those failing tests.

This fixes a couple other test cases involving toString() as well.
@rbri
Copy link
Collaborator

rbri commented Aug 21, 2024

+1

@gbrail
Copy link
Collaborator

gbrail commented Aug 22, 2024

Looks good to me. I will try to merge it soon. Thanks!

@gbrail gbrail merged commit 7e4fa18 into mozilla:master Aug 23, 2024
3 checks passed
@camnwalter camnwalter deleted the error-cause branch August 23, 2024 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ES2022 Error.cause
4 participants