aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/blob.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-03-31 18:41:28 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-05-03 14:18:30 -0400
commitd7b96db33ca8f2b8a162df38e0f00e95f5ea6fa1 (patch)
treeefd1e7f7ec1dd30467c2a67306e1a639837abead /src/components/script/dom/blob.rs
parentffdc3f5b32a345b88eed774848924e862d47c093 (diff)
downloadservo-d7b96db33ca8f2b8a162df38e0f00e95f5ea6fa1.tar.gz
servo-d7b96db33ca8f2b8a162df38e0f00e95f5ea6fa1.zip
Implement safe rooting strategy via Unrooted, Root, JSRef, and JS.
Diffstat (limited to 'src/components/script/dom/blob.rs')
-rw-r--r--src/components/script/dom/blob.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/dom/blob.rs b/src/components/script/dom/blob.rs
index 8dba1775ff6..0399568063d 100644
--- a/src/components/script/dom/blob.rs
+++ b/src/components/script/dom/blob.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::js::{JS, JSRef, RootCollection};
+use dom::bindings::js::{JS, JSRef, RootCollection, Unrooted};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::bindings::error::Fallible;
use dom::bindings::codegen::BindingDeclarations::BlobBinding;
@@ -23,7 +23,7 @@ impl Blob {
}
}
- pub fn new(window: &JSRef<Window>) -> JS<Blob> {
+ pub fn new(window: &JSRef<Window>) -> Unrooted<Blob> {
reflect_dom_object(~Blob::new_inherited(window.unrooted()),
window,
BlobBinding::Wrap)
@@ -31,7 +31,7 @@ impl Blob {
}
impl Blob {
- pub fn Constructor(window: &JSRef<Window>) -> Fallible<JS<Blob>> {
+ pub fn Constructor(window: &JSRef<Window>) -> Fallible<Unrooted<Blob>> {
Ok(Blob::new(window))
}
@@ -43,7 +43,7 @@ impl Blob {
~""
}
- pub fn Slice(&self, _start: Option<i64>, _end: Option<i64>, _contentType: Option<DOMString>) -> JS<Blob> {
+ pub fn Slice(&self, _start: Option<i64>, _end: Option<i64>, _contentType: Option<DOMString>) -> Unrooted<Blob> {
let roots = RootCollection::new();
let window = self.window.root(&roots);
Blob::new(&window.root_ref())