mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Rename GlobalRoot::root_ref() to GlobalRoot::r() for consistency.
This commit is contained in:
parent
d09d245ee1
commit
6077ed0ce8
9 changed files with 23 additions and 23 deletions
|
@ -121,13 +121,13 @@ impl<'a> BlobMethods for JSRef<'a, Blob> {
|
|||
let span: i64 = max(relativeEnd - relativeStart, 0);
|
||||
let global = self.global.root();
|
||||
match self.bytes {
|
||||
None => Blob::new(&global.root_ref(), None, relativeContentType.as_slice()),
|
||||
None => Blob::new(&global.r(), None, relativeContentType.as_slice()),
|
||||
Some(ref vec) => {
|
||||
let start = relativeStart.to_uint().unwrap();
|
||||
let end = (relativeStart + span).to_uint().unwrap();
|
||||
let mut bytes: Vec<u8> = Vec::new();
|
||||
bytes.push_all(vec.slice(start, end));
|
||||
Blob::new(&global.root_ref(), Some(bytes), relativeContentType.as_slice())
|
||||
Blob::new(&global.r(), Some(bytes), relativeContentType.as_slice())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue