-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
perf_hooks: refactor to avoid unsafe array iteration #36723
Conversation
@@ -640,6 +641,7 @@ function sortedInsert(list, entry) { | |||
} | |||
|
|||
class ELDHistogram extends Histogram { | |||
constructor(i) { super(i); } // eslint-disable-line no-useless-constructor |
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.
I know this has been discussed elsewhere but I can't remember the reason we're doing this.
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.
Yeah, that's a bug in the ECMAScript spec, it should be fixed by tc39/ecma262#2216.
Relevant spec section: https://tc39.es/ecma262/#sec-runtime-semantics-classdefinitionevaluation
If constructor is empty, then
If ClassHeritageopt is present, then
Let constructorText be the source text
constructor(...args) { super(...args); }
Landed in 7c76762...5ad67a7 |
PR-URL: #36723 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #36723 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #36723 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #36723 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #36723 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes