mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
parent
d1733aa502
commit
7c32ad7c3d
5 changed files with 28 additions and 28 deletions
|
@ -65,7 +65,7 @@ impl ImageData {
|
|||
if let Some(jsobject) = opt_jsobject {
|
||||
let cx = global.get_cx();
|
||||
typedarray!(in(cx) let array_res: Uint8ClampedArray = jsobject);
|
||||
let array = array_res
|
||||
let mut array = array_res
|
||||
.map_err(|_| Error::Type("Argument to Image data is not an Uint8ClampedArray".to_owned()))?;
|
||||
|
||||
let byte_len = array.as_slice().len() as u32;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue