node
node copied to clipboard
perf_hooks: fix webperf idlharness
lib: brand check event handler property receivers
Event handler properties defined by defineEventHandler
should check
if the receiver is a valid EventTarget
.
perf_hooks: fix webperf idlharness
- Enforce receiver checks on IDL interfaces.
- Avoid prototype manipulation on constructing IDL interfaces with
ReflectConstruct
. -
defineReplaceableAttribute
should create IDL getter/setter. - Corrected
PerformanceResourceTiming
to inherit the public interfacePerformanceEntry
instead of the internal interfaceInternalPerformanceResourceTiming
. -
detail
is not a specified attribute onPerfomanceEntry
. Node.js specific extensions are moved to a subclass ofPerformanceEntry
asPerformanceNodeEntry
.
perf_hooks: expose webperf global scope interfaces
Exposes PerformanceEntry
, PerformanceMark
, PerformanceMeasure
,
PerformanceObserver
, PerformanceObserverEntryList
,
and PerformanceResourceTiming
to the global scope.
Review requested:
- [ ] @nodejs/startup
CI: https://ci.nodejs.org/job/node-test-pull-request/46402/
As this is updating global interfaces for spec compliance, I'm marking it as don't land on LTS versions.
As a spec-compliance update, should this be considered a breaking change thus a semver-major?
/cc @nodejs/diagnostics @nodejs/tsc any inputs will be helpful <3
Given that it is going to break usages on performance.now()
without receivers, I'm marking this as a breaking change, hence a semver-major patch.
@nodejs/tsc would you mind weighing in and taking a look at this PR? thank you <3
Given that it is going to break usages on performance.now() without receivers, I'm marking this as a breaking change, hence a semver-major patch.
Can you articulate this with an example?
Given that it is going to break usages on performance.now() without receivers, I'm marking this as a breaking change, hence a semver-major patch.
Can you articulate this with an example?
Example from Chrome:
This doesn't throw in Node.js 18.
@legendecas if this is semver-major, do we want to also include the other changes from https://github.com/nodejs/node/pull/44460?
if this is semver-major, do we want to also include the other changes from https://github.com/nodejs/node/pull/44460?
yeah... make sense to me. I can do it in this PR too.
New globals need to be documented in globals.md
, and an entry for each should be added in lib/eslintrc.yml
as well.
thanks for the suggestions! updated :)
CI: https://ci.nodejs.org/job/node-test-pull-request/46671/
CI: https://ci.nodejs.org/job/node-test-pull-request/46821/
CI: https://ci.nodejs.org/job/node-test-pull-request/47007/
CI: https://ci.nodejs.org/job/node-test-pull-request/47006/
Landed in ecd5de08b78a...587367d10791. Thank you for the review!