Closed jdm closed 7 years ago
@bd339 Would you like to work on this? We can use it to replace some places in Servo that invoke this code directly.
Yeah I can take it on. Thanks for taking the time to find it.
@bd339 Have you made any progress on this?
I have looked into it, but I ran into a problem with building this crate. How am I supposed to build the rust-mozjs crate? I tried a simple cargo build
after cloning, but I got this error message:
unable to get packages from source
Caused by:
failed to parse manifest at `/home/bd339/.cargo/registry/src/github.com-88ac128001ac3a9a/heapsize-0.3.8/Cargo.toml`
Caused by:
could not parse input as TOML
/home/bd339/.cargo/registry/src/github.com-88ac128001ac3a9a/heapsize-0.3.8/Cargo.toml:10:9 expected a key but found an empty string
/home/bd339/.cargo/registry/src/github.com-88ac128001ac3a9a/heapsize-0.3.8/Cargo.toml:10:9-10:10 expected `.`, but found `'`
It seems you may be using an old rust version? Which version are you using?
Not at the pc in question right now, but I think it is cargo version 0.8.0.
Yeah you were right @emilio, I got it to build after updating rust and configuring it to use the nightly toolchain. Thanks.
There's a JS_GetArrayBufferViewType method that returns a enum indicating the concrete type of a JS typed array. We should add a convenience method to the high-level ArrayBufferView type that invokes it on the contained pointer and returns the result.
Code:
typedarray.rs
Test: add a test totests/typedarray.rs
and run viacargo test