-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Update WebIDL.py #32495
Merged
Merged
Update WebIDL.py #32495
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🔨 Triggering try run (#9516389545) for Linux WPT |
Test results for linux-wpt-layout-2020 from try job (#9516389545): Flaky unexpected result (11)
Stable unexpected results that are known to be intermittent (15)
|
✨ Try run (#9516389545) succeeded. |
jdm
reviewed
Jun 14, 2024
jdm
reviewed
Jun 15, 2024
The following diff builds for me: diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 5bb0a8aaec..e3ff49930f 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -3981,12 +3981,7 @@ let args = CallArgs::from_vp(vp, argc);
let global = GlobalScope::from_object(args.callee());
"""
- # Exposure set {'DissimilarOriginWindow', 'Window'} should downcast to Window.
- # DissimilarOriginWindow is not for external usage.
- if len(self.exposureSet) == 2 and "Window" in self.exposureSet and "DissimilarOriginWindow" in self.exposureSet:
- print(self.exposureSet)
- preamble += "let global = DomRoot::downcast::<dom::types::Window>(global).unwrap();\n"
- elif len(self.exposureSet) == 1:
+ if len(self.exposureSet) == 1:
preamble += ("let global = DomRoot::downcast::<dom::types::%s>(global).unwrap();\n" %
list(self.exposureSet)[0])
return CGList([CGGeneric(preamble), self.generate_code()])
@@ -6136,11 +6131,7 @@ let args = CallArgs::from_vp(vp, argc);
let global = GlobalScope::from_object(JS_CALLEE(*cx, vp).to_object());
"""
- # Exposure set {'DissimilarOriginWindow', 'Window'} should downcast to Window.
- # DissimilarOriginWindow is not for external usage.
- if len(self.exposureSet) == 2 and "Window" in self.exposureSet and "DissimilarOriginWindow" in self.exposureSet:
- preamble += "let global = DomRoot::downcast::<dom::types::Window>(global).unwrap();\n"
- elif len(self.exposureSet) == 1:
+ if len(self.exposureSet) == 1:
preamble += """\
let global = DomRoot::downcast::<dom::types::%s>(global).unwrap();
""" % list(self.exposureSet)[0]
diff --git a/components/script/dom/webidls/DissimilarOriginWindow.webidl b/components/script/dom/webidls/DissimilarOriginWindow.webidl
index 2e55d33f00..bce8bddb57 100644
--- a/components/script/dom/webidls/DissimilarOriginWindow.webidl
+++ b/components/script/dom/webidls/DissimilarOriginWindow.webidl
@@ -13,7 +13,7 @@
// way to enforce security policy.
// https://html.spec.whatwg.org/multipage/#window
-[Global=(Window,DissimilarOriginWindow), Exposed=(Window,DissimilarOriginWindow), LegacyNoInterfaceObject]
+[Global=DissimilarOriginWindow, Exposed=(Window,DissimilarOriginWindow), LegacyNoInterfaceObject]
interface DissimilarOriginWindow : GlobalScope {
[LegacyUnforgeable] readonly attribute WindowProxy window;
[BinaryName="Self_", Replaceable] readonly attribute WindowProxy self; |
jdm
approved these changes
Jun 15, 2024
shanehandley
pushed a commit
to shanehandley/servo
that referenced
this pull request
Jun 15, 2024
* Update WebIDL.py * Update WebIDL.py * Add builtin-array.patch * Fix CodegenRust.py and Configuration.py * Fix missing downcasts * mach fmt * Update check and comment to explain why we need this check * Update Global of DissimilarOriginWindow.webidl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We found some codegen error when trying to add queuing strategy, but firefox has exact webidl and works fine.
It's time to update servo's webidl.py to fix this issue.
./mach build -d
does not report any errors./mach test-tidy
does not report any errors