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

Descriptor of Function.length should be configurable #521

Closed
RuralHunter opened this issue Nov 25, 2022 · 12 comments
Closed

Descriptor of Function.length should be configurable #521

RuralHunter opened this issue Nov 25, 2022 · 12 comments
Assignees

Comments

@RuralHunter
Copy link
Contributor

var desc=Object.getOwnPropertyDescriptor(Function.prototype, 'length');
In Chrome, desc.configurable is true while in htmlunit it's false.

@rbri
Copy link
Member

rbri commented Nov 26, 2022

Hi @RuralHunter,
fix is on the way - mozilla/rhino#1284

Is it ok to have a new snapshot build containing this at the end of the week (~ 2.12)?

@rbri rbri self-assigned this Nov 26, 2022
@RuralHunter
Copy link
Contributor Author

sure, thanks a lot!

@RuralHunter
Copy link
Contributor Author

RuralHunter commented Nov 27, 2022

Sorry, it seems more change is needed.

var f=function(){};
var desc=Object.getOwnPropertyDescriptor(f, 'length');

and
var desc=Object.getOwnPropertyDescriptor(alert, 'length');

desc.configurable still gets false.

@RuralHunter RuralHunter reopened this Nov 27, 2022
@rbri
Copy link
Member

rbri commented Nov 27, 2022

good point, pr is updated/fixed

@RuralHunter
Copy link
Contributor Author

RuralHunter commented Nov 27, 2022

Thanks. I tested the new pr but it still didn't fix attributes for builtin functions(maybe others too):
var desc=Object.getOwnPropertyDescriptor(alert, 'length');
This still gets false result.

@rbri
Copy link
Member

rbri commented Nov 27, 2022

oh, i guess there is more to do... i have a fix already but i have to think about this to make the most generic solution

@rbri
Copy link
Member

rbri commented Nov 27, 2022

@RuralHunter next try is on the way

@RuralHunter
Copy link
Contributor Author

Thanks. This time it fully works for my testing web site.

@rbri
Copy link
Member

rbri commented Nov 28, 2022

As always - it's a pleasure to work with you improving HtmlUnit (and sometimes Rhino).

Thanks for all your input.

rbri added a commit that referenced this issue Nov 30, 2022
@rbri
Copy link
Member

rbri commented Nov 30, 2022

Rhino PR is accepted, building a new snapshot is on the way.

@RuralHunter
Copy link
Contributor Author

Great, thanks!

@rbri
Copy link
Member

rbri commented Nov 30, 2022

You can grab it.

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

No branches or pull requests

2 participants