-
Notifications
You must be signed in to change notification settings - Fork 479
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
Prevent harness code not loading when async/generator/asyncGenerator not supported #4164
Prevent harness code not loading when async/generator/asyncGenerator not supported #4164
Conversation
a4f2d37
to
5969271
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I'm less sure about this one, because this harness file is only used in 4 tests which are all guaranteed to fail anyway if async or generators aren't supported. So doesn't really matter if they fail in the harness file.
Or is the problem that you get a SyntaxError instead of a runtime error? (In that case, could we use the new Function('...')
without swallowing the exception with catch(e) {}
? I tend not to like unconditionally dropping exceptions...)
@ptomato the issue is any error: if for example only one of the three flavors isn't supported, that shouldn't stop/prevent the other two variables from being instantiated. I don't see how that can be achieved without catching potential exceptions |
Got it, thanks. I understand now. |
Co-authored-by: Philip Chimento <[email protected]>
089878f
to
8dea11c
Compare
Function statements require a name. See tc39#4166
* Fix syntax error from #4164 Function statements require a name. See #4166 * Apply suggestions from code review Co-authored-by: Jordan Harband <[email protected]> --------- Co-authored-by: Jordan Harband <[email protected]>
In order to not fail because harness code fails to load due to using not-supported EcmaScript features while not needed
Relates to ##3032