diff --git a/Cargo.lock b/Cargo.lock index f6455f34f83..32936f9c0d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3825,7 +3825,7 @@ dependencies = [ [[package]] name = "mozjs" version = "0.14.1" -source = "git+https://github.com/servo/rust-mozjs#fe104a26147a42f6267286cd856361a126ab733b" +source = "git+https://github.com/servo/rust-mozjs#ef63e568c6aaa1c0f0d1c11f49a99acff1306709" dependencies = [ "cc", "lazy_static", @@ -3838,7 +3838,7 @@ dependencies = [ [[package]] name = "mozjs_sys" version = "0.68.2" -source = "git+https://github.com/servo/mozjs?rev=82da136c53d7ca7b0b7fe1c5622627036ef31899#82da136c53d7ca7b0b7fe1c5622627036ef31899" +source = "git+https://github.com/servo/mozjs?rev=95387f7235ae9ba950a8dbebb850f41709ff5b1d#95387f7235ae9ba950a8dbebb850f41709ff5b1d" dependencies = [ "bindgen", "cc", diff --git a/canvas.png b/canvas.png new file mode 100644 index 00000000000..d83232e20e1 Binary files /dev/null and b/canvas.png differ diff --git a/components/script/dom/imagedata.rs b/components/script/dom/imagedata.rs index 39e3b061711..d8574a9b666 100644 --- a/components/script/dom/imagedata.rs +++ b/components/script/dom/imagedata.rs @@ -113,7 +113,8 @@ impl ImageData { let len = width * height * 4; let cx = global.get_cx(); rooted!(in (*cx) let mut array = ptr::null_mut::()); - Uint8ClampedArray::create(*cx, CreateWith::Length(len), array.handle_mut()).unwrap(); + Uint8ClampedArray::create(*cx, CreateWith::Length(len as usize), array.handle_mut()) + .unwrap(); (*imagedata).data.set(array.get()); Ok(reflect_dom_object(imagedata, global))