mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Remove almost all uses of Heap::new.
This commit is contained in:
parent
f5eb8445b0
commit
77b3e911c1
4 changed files with 17 additions and 9 deletions
|
@ -339,8 +339,9 @@ impl FileReaderMethods for FileReader {
|
|||
FileReaderResult::String(ref string) =>
|
||||
StringOrObject::String(string.clone()),
|
||||
FileReaderResult::ArrayBuffer(ref arr_buffer) => {
|
||||
StringOrObject::Object(RootedTraceableBox::new(
|
||||
Heap::new((*arr_buffer.ptr.get()).to_object())))
|
||||
let result = RootedTraceableBox::new(Heap::default());
|
||||
result.set((*arr_buffer.ptr.get()).to_object());
|
||||
StringOrObject::Object(result)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue