aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/blob.rs
diff options
context:
space:
mode:
authorwebbeef <me@webbeef.org>2024-10-07 19:30:04 -0700
committerGitHub <noreply@github.com>2024-10-08 02:30:04 +0000
commitd3c0785d64f0186a31f38308d31c6eee4b577210 (patch)
tree439f954a7d677f9622855df1c5bbcde69e24cfb2 /components/script/dom/blob.rs
parent7d931e673af2780f3f62d52cb17324ec2cc68c71 (diff)
downloadservo-d3c0785d64f0186a31f38308d31c6eee4b577210.tar.gz
servo-d3c0785d64f0186a31f38308d31c6eee4b577210.zip
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>
Diffstat (limited to 'components/script/dom/blob.rs')
-rw-r--r--components/script/dom/blob.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs
index 4b3aceb150b..7f0307a5a2d 100644
--- a/components/script/dom/blob.rs
+++ b/components/script/dom/blob.rs
@@ -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