mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix tyvar_behind_raw_pointer warnings
https://github.com/rust-lang/rust/issues/46906
This commit is contained in:
parent
cee2aadd82
commit
4d459bce32
20 changed files with 55 additions and 53 deletions
|
@ -26,6 +26,7 @@ use hyper::mime::{Attr, Mime};
|
|||
use js::jsapi::Heap;
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsapi::JSContext;
|
||||
use js::jsapi::JSObject;
|
||||
use js::jsval::{self, JSVal};
|
||||
use js::typedarray::{ArrayBuffer, CreateWith};
|
||||
use servo_atoms::Atom;
|
||||
|
@ -261,7 +262,7 @@ impl FileReader {
|
|||
fn perform_readasarraybuffer(result: &DomRefCell<Option<FileReaderResult>>,
|
||||
cx: *mut JSContext, _: ReadMetaData, bytes: &[u8]) {
|
||||
unsafe {
|
||||
rooted!(in(cx) let mut array_buffer = ptr::null_mut());
|
||||
rooted!(in(cx) let mut array_buffer = ptr::null_mut::<JSObject>());
|
||||
assert!(ArrayBuffer::create(cx, CreateWith::Slice(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