Skip to content
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: resource timing idlharness #44460

Closed
wants to merge 2 commits into from

Conversation

legendecas
Copy link
Member

  • Exposes PerformanceEntry and PerformanceResourceTiming to the globalThis.
  • Event handler properties defined by defineEventHandler should check if this is a valid EventTarget, as enforced by the idlharness.
  • Corrected PerformanceResourceTiming to inherit the public interface PerformanceEntry instead of the internal InternalPerformanceResourceTiming.

The first commit comes from #44439.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Aug 30, 2022
@@ -30,6 +30,11 @@ const initiatorType = '';
const cacheMode = '';

async function main() {
const invalidValues = [ null, undefined, true, false, -1, 1.1, Infinity, NaN, '', 'foo', {}, [], () => {} ];
for (const value of invalidValues) {
assert.throws(() => performance.setResourceTimingBufferSize(value), `${value} should throw`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should it throw?

Suggested change
assert.throws(() => performance.setResourceTimingBufferSize(value), `${value} should throw`);
assert.throws(() => performance.setResourceTimingBufferSize(value), { code:`ERR_INVALID_ARG_TYPE` });

@aduh95 aduh95 added the semver-major PRs that contain breaking changes and should be released in the next major version. label Aug 30, 2022
Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semver-major as it adds a new global. It should be documented in globals.md, and an entry should be added in lib/eslintrc.yml as well.

@legendecas
Copy link
Member Author

Not all of the changes should be semver-major. I'll split this PR into smaller ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants