Skip to content

Conversation

@Taym95
Copy link
Member

@Taym95 Taym95 commented Nov 27, 2025

fixes an intermittent RefCell already borrowed panic in the ReadableStream implementation by tightening the borrow scope of ReadableStream::reader in the error and cancel.

Testing: super hard to make crash test for this.

Fixes: #40894

@Taym95 Taym95 requested a review from gterzian as a code owner November 27, 2025 00:29
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 27, 2025
@Taym95 Taym95 force-pushed the fix-RefCell-already-borrowed-panic-in-readablestream branch from df0a083 to 83e03a6 Compare November 27, 2025 00:31
Copy link
Member

@yezhizhen yezhizhen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Only lint and one redundant comment.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Nov 27, 2025
@Taym95 Taym95 force-pushed the fix-RefCell-already-borrowed-panic-in-readablestream branch from 83e03a6 to a10fc86 Compare November 27, 2025 08:23
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 27, 2025
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
@Taym95 Taym95 force-pushed the fix-RefCell-already-borrowed-panic-in-readablestream branch from a10fc86 to ecaaa95 Compare November 27, 2025 08:23
@Taym95 Taym95 enabled auto-merge November 27, 2025 08:24
@Taym95 Taym95 added this pull request to the merge queue Nov 27, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 27, 2025
Merged via the queue into servo:main with commit 8e04f8f Nov 27, 2025
29 checks passed
@Taym95 Taym95 deleted the fix-RefCell-already-borrowed-panic-in-readablestream branch November 27, 2025 09:55
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RefCell already borrowed @ readablestream.rs:1645

3 participants