mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Set the placeholder canvas element of offscreenCanvas to a weak reference in transferControlToOffscreen() (#37764)
Set the placeholder canvas element of offscreenCanvas to a weak reference in transferControlToOffscreen() Testing: I do not understand how to test it, suggestions appreciated Fixes: https://github.com/servo/servo/issues/35626 --------- Signed-off-by: Rodion Borovyk <rodion.borovyk@gmail.com>
This commit is contained in:
parent
4cd7c5196b
commit
60c10d710d
5 changed files with 52 additions and 27 deletions
|
@ -23,6 +23,7 @@ use js::error::throw_type_error;
|
|||
use js::rust::{HandleObject, HandleValue};
|
||||
use layout_api::HTMLCanvasData;
|
||||
use pixels::{Snapshot, SnapshotAlphaMode, SnapshotPixelFormat};
|
||||
use script_bindings::weakref::WeakRef;
|
||||
use servo_media::streams::MediaStreamType;
|
||||
use servo_media::streams::registry::MediaStreamId;
|
||||
use style::attr::AttrValue;
|
||||
|
@ -675,7 +676,7 @@ impl HTMLCanvasElementMethods<crate::DomTypeHolder> for HTMLCanvasElement {
|
|||
None,
|
||||
self.Width().into(),
|
||||
self.Height().into(),
|
||||
Some(&Dom::from_ref(self)),
|
||||
Some(WeakRef::new(self)),
|
||||
can_gc,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue