script: Replace RAII of CallSetup and AutoEntryScript with a function wrapper#42715
Merged
sagudev merged 3 commits intoservo:mainfrom Feb 25, 2026
Merged
script: Replace RAII of CallSetup and AutoEntryScript with a function wrapper#42715sagudev merged 3 commits intoservo:mainfrom
sagudev merged 3 commits intoservo:mainfrom
Conversation
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 25, 2026
The span needs to be assigned to a variable, so that it drops at the end of scope. This was introduced in #42715. Additionally also switch tho the profile_traits macro to simplify the statement. Testing: Manually verified the warning is fixed. Signed-off-by: Jonathan Schwender <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 28, 2026
As in #42715 we will need cx in drop so we need to go to function wrapper pattern. Testing: Just refactor should be covered by WPT tests. --------- Signed-off-by: sagudev <[email protected]>
shubhamg13
pushed a commit
to shubhamg13/servo
that referenced
this pull request
Mar 2, 2026
The span needs to be assigned to a variable, so that it drops at the end of scope. This was introduced in servo#42715. Additionally also switch tho the profile_traits macro to simplify the statement. Testing: Manually verified the warning is fixed. Signed-off-by: Jonathan Schwender <[email protected]>
simonwuelker
pushed a commit
to simonwuelker/servo
that referenced
this pull request
Mar 3, 2026
…#42905) As in servo#42715 we will need cx in drop so we need to go to function wrapper pattern. Testing: Just refactor should be covered by WPT tests. --------- Signed-off-by: sagudev <[email protected]>
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.
As mentioned in #40600 we will need this to properly handle &mut JSContext (we cannot pass it to drop) and I think this wrappers are preferred ways of doing this in rust as it is safe to forget (not call drop) which is unsound in this case (due to realm stack at least).
Revieable per commits.
Testing: Just a refactor, but should be covered by WPT