-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Borrow hazard in ReadableStreamDefaultController::dequeue_value #39947
Copy link
Copy link
Closed
Labels
A-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentC-has-patchI-panicServo encounters a panic.Servo encounters a panic.
Description
servo/components/script/dom/readablestreamdefaultcontroller.rs
Lines 454 to 457 in 16506e4
| fn dequeue_value(&self, cx: SafeJSContext, rval: MutableHandleValue, can_gc: CanGc) { | |
| let mut queue = self.queue.borrow_mut(); | |
| queue.dequeue_value(cx, Some(rval), can_gc); | |
| } |
Since invoking QueueWithSizes::dequeue_value can trigger a GC, we need to push the mutability of QueueWithSizes deeper so it can be a &self method instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentC-has-patchI-panicServo encounters a panic.Servo encounters a panic.