mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #15117 - servo:fileapi, r=nox
Fix and annotate some FileAPI test failures. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15117) <!-- Reviewable:end -->
This commit is contained in:
commit
e6f661c984
8 changed files with 12 additions and 38 deletions
|
@ -27,7 +27,7 @@ use js::jsapi::Heap;
|
|||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsapi::JSContext;
|
||||
use js::jsval::{self, JSVal};
|
||||
use js::typedarray::Uint8Array;
|
||||
use js::typedarray::ArrayBuffer;
|
||||
use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64};
|
||||
use script_thread::RunnableWrapper;
|
||||
use servo_atoms::Atom;
|
||||
|
@ -269,7 +269,7 @@ impl FileReader {
|
|||
cx: *mut JSContext, _: ReadMetaData, bytes: &[u8]) {
|
||||
unsafe {
|
||||
rooted!(in(cx) let mut array_buffer = ptr::null_mut());
|
||||
assert!(Uint8Array::create(cx, bytes.len() as u32, Some(bytes), array_buffer.handle_mut()).is_ok());
|
||||
assert!(ArrayBuffer::create(cx, bytes.len() as u32, Some(bytes), array_buffer.handle_mut()).is_ok());
|
||||
|
||||
*result.borrow_mut() = Some(FileReaderResult::ArrayBuffer(Heap::default()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue