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

Clarify that measure() may throw a SyntaxError #30

Closed
wants to merge 5 commits into from

Conversation

philipwalton
Copy link
Member

Addresses #21 .

@igrigorik
Copy link
Member

Hmm, I don't think this fully resolves the underlying issue:

We also need to throw SyntaxError if measure's name == attribute of PerformanceTiming? Per earlier discussions, I think our pan was to enumerate and freeze the list of "blacklisted" attribute names in UT, with a callout that they're mapped to old PerformanceTiming (Nav Timing L1) interface.

With above in place, I think we could refactor both mark() and measure() to call some "check entry name" algorithm that would consult the list?

@philipwalton
Copy link
Member Author

@igrigorik yeah, as I explained in #22 (comment), I was confused and thought that the use of NT names was unspecified behavior that vendors all implemented, but now I see I was wrong.

I've updated this PR to use the same text in measure as is used in mark. I wasn't sure we needed a new algorithm since this was just one line, but let me know if you think that would be cleaner.

@philipwalton
Copy link
Member Author

I'm closing this as my changes have increased in scope. The new changes can be tracked in #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants