Skip to content

Borrow hazard in ReadableStreamDefaultController::dequeue_value #39947

@jdm

Description

@jdm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domInteracting with the DOM from web contentC-has-patchI-panicServo encounters a panic.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions