-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
events: check signal before listener #46054
events: check signal before listener #46054
Conversation
In WPT Events, TypeError is expected if both listener and signal are null. But checking listener doesn't throw TypeError. So check signal before listener because checking signal throws TypeError if signal is null.
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.
lgtm
Landed in 5d4cb84 |
In WPT Events, TypeError is expected if both listener and signal are null. But checking listener doesn't throw TypeError. So check signal before listener because checking signal throws TypeError if signal is null. PR-URL: nodejs#46054 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
In WPT Events, TypeError is expected if both listener and signal are null. But checking listener doesn't throw TypeError. So check signal before listener because checking signal throws TypeError if signal is null. PR-URL: #46054 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
This is breaking tons of tests in v18.x 💔 |
@juanarbol When I try to backport this PR to v18.x-staging, then I met conflict because previous PR(#43153) which changed |
In WPT Events, TypeError is expected if both listener and signal are null. But checking listener doesn't throw TypeError. So check signal before listener because checking signal throws TypeError if signal is null.