mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
refactor: propagate CanGc arguments through callers (#35591)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
parent
02199520f2
commit
b0b0289014
74 changed files with 403 additions and 275 deletions
|
@ -50,13 +50,16 @@ impl WebGLBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn maybe_new(context: &WebGLRenderingContext) -> Option<DomRoot<Self>> {
|
||||
pub(crate) fn maybe_new(
|
||||
context: &WebGLRenderingContext,
|
||||
can_gc: CanGc,
|
||||
) -> Option<DomRoot<Self>> {
|
||||
let (sender, receiver) = webgl_channel().unwrap();
|
||||
context.send_command(WebGLCommand::CreateBuffer(sender));
|
||||
receiver
|
||||
.recv()
|
||||
.unwrap()
|
||||
.map(|id| WebGLBuffer::new(context, id, CanGc::note()))
|
||||
.map(|id| WebGLBuffer::new(context, id, can_gc))
|
||||
}
|
||||
|
||||
pub(crate) fn new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue