Skip to content

performance.getEntriesByName ignores optional type argument #54766

Closed
@luketaher

Description

@luketaher

Version

v16.7.0 - v22.7.0

Platform

Darwin x86_64

Subsystem

perf_hooks

What steps will reproduce the bug?

Executing this script:

performance.mark('test');
performance.measure('test');

const markEntries = performance.getEntriesByName('test', 'mark');

console.log(markEntries);

How often does it reproduce? Is there a required condition?

100% of the time

What is the expected behavior? Why is that the expected behavior?

As per:

The expected behaviour is:

[
  PerformanceMark {
    name: 'test',
    entryType: 'mark',
    ...
  }
]

What do you see instead?

[
  PerformanceMeasure {
    name: 'test',
    entryType: 'measure',
    ...
  },
  PerformanceMark {
    name: 'test',
    entryType: 'mark',
    ...
  }
]

Additional information

This bug appears to have existed since performance.getEntriesByName was added as part of performance timeline spec compliance in v16.7.0.

#39297 introduced performance.getEntriesByName without a type argument. While the type argument was subsequently added to the underlying observe.getEntriesByName method in #39532, it was never passed through by performance.getEntriesByName.

Metadata

Metadata

Assignees

No one assigned

    Labels

    perf_hooksIssues and PRs related to the implementation of the Performance Timing API.web-standardsIssues and PRs related to Web APIs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions