Implement Blob methods (text/arraybuffer) and async file read method

This commit is contained in:
Kunal Mohan 2020-01-12 23:27:59 +05:30
parent 1b7223a284
commit 9859410193
No known key found for this signature in database
GPG key ID: 2B475A4524237BAC
8 changed files with 188 additions and 115 deletions

View file

@ -202,7 +202,7 @@ fn run_form_data_algorithm(
}
#[allow(unsafe_code)]
fn run_array_buffer_data_algorithm(cx: JSContext, bytes: Vec<u8>) -> Fallible<FetchedData> {
pub fn run_array_buffer_data_algorithm(cx: JSContext, bytes: Vec<u8>) -> Fallible<FetchedData> {
rooted!(in(*cx) let mut array_buffer_ptr = ptr::null_mut::<JSObject>());
let arraybuffer = unsafe {
ArrayBuffer::create(