Unverified Commit d90967b3 authored by Anna Henningsen's avatar Anna Henningsen Committed by Ruy Adorno
Browse files

events: re-use the same isTrusted getter

Creating a new function each time the property descriptor is set
comes with performance overhead, since these functions have different
identities, even if they contain the same code.

Refs: https://twitter.com/tverwaes/status/1285496612618473472

PR-URL: https://github.com/nodejs/node/pull/34459


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarYongsheng Zhang <zyszys98@gmail.com>
parent 0aa3809b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment