8000 Initialising standard objects fails when scope is not `TopLevel` · Issue #1903 · mozilla/rhino · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Initialising standard objects fails when scope is not TopLevel #1903

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

Open
aardvark179 opened this issue May 13, 2025 · 0 comments
Open

Initialising standard objects fails when scope is not TopLevel #1903

aardvark179 opened this issue May 13, 2025 · 0 comments

Comments

@aardvark179
Copy link
Contributor

I thought this was limited in terms of tests to the test 262 suite test runner, but while trying to tidy some parts of object initialisation I found it's also an issue with anything using the org.mozilla.javascript.testutils.Utils methods, and likely with other things as well. I'd suggest we take a two pronged attack to this:

  1. If the scoped passed in is null then we should create a new TopLevel rather than a NativeObject. This would make the simple path do the right thing.
  2. We cannot simply enforce that TopLevel is passed in as some users need to pass in custom scope objects which may have a different inheritance chain, but maybe we could refactor things to require these scopes to implement a Realm interface with the only requirement being that we can store the object that should represent that.
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

1 participant
0