Auto merge of #28300 - sagudev:master, r=jdm

Update mozjs to 87

Depends on: https://github.com/servo/rust-mozjs/pull/540
This commit is contained in:
bors-servo 2021-03-30 07:38:57 -04:00 committed by GitHub
commit c52d84dafa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

4
Cargo.lock generated
View file

@ -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",

BIN
canvas.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -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::<JSObject>());
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))