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

handleNew regression: knownBuiltIns are wrapped #417

Open
rachitnigam opened this issue Jan 10, 2019 · 2 comments
Open

handleNew regression: knownBuiltIns are wrapped #417

rachitnigam opened this issue Jan 10, 2019 · 2 comments

Comments

@rachitnigam
Copy link
Collaborator

With handleNew: wrapper, this example:

new WeakMap

turns into:

handleNew.box($S.g.WeakMap)

while the expected behavior is leaving the code alone.

The issue is that useGlobalObject breaks the logic used to leave the code unwrapped since WeakMap turns to $S.g.WeakMap.

This works fine for most built-ins, but breaks when I tried to use Event.

P.S. The logic here is redundant.

@baxtersa
Copy link
Contributor

What do you mean by "breaks when I tried to use Event"? Do you mean adding Event to the runner's .g object doesn't work?

@rachitnigam
Copy link
Collaborator Author

Yes

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