mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Various CanGc fixes in components/script/dom (#33706)
* Propagate 'can_gc' in IFrame DOM code Signed-off-by: webbeef <me@webbeef.org> * Propagate 'can_gc' in HTML video and image elements Signed-off-by: webbeef <me@webbeef.org> * Propagate 'can_gc' in Blob and dependencies Signed-off-by: webbeef <me@webbeef.org> * Leftover can_gc fixes for HTMLMediaElement Signed-off-by: webbeef <me@webbeef.org> * Address comment Signed-off-by: webbeef <me@webbeef.org> --------- Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
7d931e673a
commit
d3c0785d64
14 changed files with 67 additions and 42 deletions
|
@ -41,8 +41,8 @@ pub struct Blob {
|
|||
}
|
||||
|
||||
impl Blob {
|
||||
pub fn new(global: &GlobalScope, blob_impl: BlobImpl) -> DomRoot<Blob> {
|
||||
Self::new_with_proto(global, None, blob_impl, CanGc::note())
|
||||
pub fn new(global: &GlobalScope, blob_impl: BlobImpl, can_gc: CanGc) -> DomRoot<Blob> {
|
||||
Self::new_with_proto(global, None, blob_impl, can_gc)
|
||||
}
|
||||
|
||||
fn new_with_proto(
|
||||
|
@ -162,7 +162,7 @@ impl Serializable for Blob {
|
|||
*blob_impls = None;
|
||||
}
|
||||
|
||||
let deserialized_blob = Blob::new(owner, blob_impl);
|
||||
let deserialized_blob = Blob::new(owner, blob_impl, CanGc::note());
|
||||
|
||||
let blobs = blobs.get_or_insert_with(HashMap::new);
|
||||
blobs.insert(storage_key, deserialized_blob);
|
||||
|
@ -251,7 +251,7 @@ impl BlobMethods for Blob {
|
|||
normalize_type_string(content_type.unwrap_or(DOMString::from("")).as_ref());
|
||||
let rel_pos = RelativePos::from_opts(start, end);
|
||||
let blob_impl = BlobImpl::new_sliced(rel_pos, self.blob_id, type_string);
|
||||
Blob::new(&self.global(), blob_impl)
|
||||
Blob::new(&self.global(), blob_impl, CanGc::note())
|
||||
}
|
||||
|
||||
// https://w3c.github.io/FileAPI/#text-method-algo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue