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

Add PerformanceObserver.supportedEntryTypes #25587

Closed
pshaughn opened this issue Jan 23, 2020 · 2 comments · Fixed by #25697
Closed

Add PerformanceObserver.supportedEntryTypes #25587

pshaughn opened this issue Jan 23, 2020 · 2 comments · Fixed by #25697
Assignees
Labels
A-content/dom Interacting with the DOM from web content

Comments

@pshaughn
Copy link
Member

pshaughn commented Jan 23, 2020

https://w3c.github.io/performance-timeline/#supportedentrytypes-attribute Semantics of what it returns are simple, but it needs to be [SameObject] static readonly attribute FrozenArray<DOMString> which is a lot of adjectives.

@jdm jdm added the A-content/dom Interacting with the DOM from web content label Jan 23, 2020
@jdm jdm added this to To do in web-platform-test failures via automation Jan 23, 2020
@pshaughn
Copy link
Member Author

FrozenArray (#10072) is the one part of this we don't seem to have; some other code is returning "any" as a workaround.

@jdm
Copy link
Member

jdm commented Jan 25, 2020

This is the other half of the workaround:

/// Returns a JSVal representing a frozen array of ports
pub fn to_frozen_array<T: ToJSValConvertible>(convertibles: &[T], cx: SafeJSContext) -> JSVal {
rooted!(in(*cx) let mut ports = UndefinedValue());
unsafe { convertibles.to_jsval(*cx, ports.handle_mut()) };
rooted!(in(*cx) let obj = ports.to_object());
unsafe { JS_FreezeObject(*cx, RawHandleObject::from(obj.handle())) };
*ports
}

@pshaughn pshaughn self-assigned this Feb 5, 2020
bors-servo pushed a commit that referenced this issue Feb 5, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo pushed a commit that referenced this issue Feb 12, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo pushed a commit that referenced this issue Feb 13, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo pushed a commit that referenced this issue Feb 13, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo pushed a commit that referenced this issue Feb 13, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo pushed a commit that referenced this issue Feb 14, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo pushed a commit that referenced this issue Feb 14, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo pushed a commit that referenced this issue Feb 14, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo pushed a commit that referenced this issue Feb 14, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo pushed a commit that referenced this issue Feb 14, 2020
PerformanceObserver.supportedEntryTypes

<!-- Please describe your changes on the following line: -->
It felt odd to cache these directly in GlobalScope, but they need to be [SameObject] and the global scope is where the spec implies they go.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25587

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
web-platform-test failures automation moved this from To do to Done Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content
Projects
Development

Successfully merging a pull request may close this issue.

2 participants