aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/globalscope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/globalscope.rs')
-rw-r--r--components/script/dom/globalscope.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs
index 55db2e4d248..ec2ed70dd15 100644
--- a/components/script/dom/globalscope.rs
+++ b/components/script/dom/globalscope.rs
@@ -2992,8 +2992,7 @@ impl GlobalScope {
if let Some(snapshot) = canvas.get_image_data() {
let size = snapshot.size().cast();
- let image_bitmap =
- ImageBitmap::new(self, size.width, size.height, can_gc).unwrap();
+ let image_bitmap = ImageBitmap::new(self, size.width, size.height, can_gc);
image_bitmap.set_bitmap_data(snapshot.to_vec());
image_bitmap.set_origin_clean(canvas.origin_is_clean());
p.resolve_native(&(image_bitmap), can_gc);
@@ -3009,8 +3008,7 @@ impl GlobalScope {
if let Some(snapshot) = canvas.get_image_data() {
let size = snapshot.size().cast();
- let image_bitmap =
- ImageBitmap::new(self, size.width, size.height, can_gc).unwrap();
+ let image_bitmap = ImageBitmap::new(self, size.width, size.height, can_gc);
image_bitmap.set_bitmap_data(snapshot.to_vec());
image_bitmap.set_origin_clean(canvas.origin_is_clean());
p.resolve_native(&(image_bitmap), can_gc);