Skip to content

Conversation

@rbri
Copy link
Collaborator

@rbri rbri commented Dec 18, 2025

This is the second step in the arguments refactoring to bring the arguments handling closer to the spec.

  • we have some test cases containg // todo; these todo marks the real world expectation

@rbri rbri force-pushed the arguments_step2 branch 2 times, most recently from 903e9e8 to 321fc8e Compare December 18, 2025 12:04
@aardvark179
Copy link
Contributor

This confused me for a minute because Function.prototype.arguments is one thing that really isn't in the spec, but I see what you're doing, and I'm happy to see things move in this direction.

@rbri
Copy link
Collaborator Author

rbri commented Dec 18, 2025

@aardvark179 as mentioned in our meeting I spend my whole time hunting for this regression HtmlUnit/htmlunit#1064. My current assumption is a problem with the caller property being visible to some functions because it is NOT defined on the function prototype but instead on every function.
Had a hard time to understand, that only the move of the 'argument' property is more or less simple. For the 'caller' we have to rethink the activation support and other stuff. Therefore I decide to let this in core-js for the moment.

The good news: after the move of the 'arguments' property we are a bit more closer to the browsers. And after I have applied this PR to my fork, I was able to change the way the caller property is implemented also (HtmlUnit@88a343c).

And with this changes, I got a detailed test suite of 'caller' tests working HtmlUnit/htmlunit-core-js@8769e0e; also some more plain HtmlUnit tests are now passing.

Next step is to check with the jenkins folks, if this solves the problem.... but this is something for the next days.


@Override
void setArguments(Object caller) {
// todo
Copy link
Contributor

Choose a reason for hiding this comment

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

What is supposed to happen here, that there is a todo for it, I wonder...? 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

throw ScriptRuntime.typeErrorById("msg.op.not.allowed");

is called far to many times (i guess), i have to check if we can have it as static function

@rbri
Copy link
Collaborator Author

rbri commented Dec 28, 2025

Jenkins is happy with this - HtmlUnit/htmlunit#1064 (comment)

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.

3 participants