script: propagate &mut JSContext in Extractable::extract#44531
Merged
Conversation
Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
sagudev
approved these changes
Apr 27, 2026
Comment on lines
93
to
98
| fn new_with_proto( | ||
| global: &GlobalScope, | ||
| proto: Option<HandleObject>, | ||
| can_gc: CanGc, | ||
| ) -> DomRoot<Response> { | ||
| reflect_dom_object_with_proto( |
Member
There was a problem hiding this comment.
FYI you can use https://doc.servo.org/script/dom/bindings/reflector/fn.reflect_dom_object_with_proto_and_cx.html, but we can leave them for follow ups.
| cx: &mut js::context::JSContext, | ||
| data: Option<DocumentOrXMLHttpRequestBodyInit>, | ||
| ) -> ErrorResult { | ||
| let can_gc = CanGc::from_cx(cx); |
Member
There was a problem hiding this comment.
Hrm, this should not exists as all CanGc::from_cx(cx) needs to be inlined. Anyway this is not your fault, but it is a good follow up.
This file contains hidden or 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
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.
Propagate
&mut JSContextinExtractable::extractand related call sites.Testing: Successful build is enough
Fixes: Part of #42638
Opened to reduces the complexity of #44254