diff options
Diffstat (limited to 'src/components/script/dom/document.rs')
-rw-r--r-- | src/components/script/dom/document.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs index c4a1099d8b6..69a02deec71 100644 --- a/src/components/script/dom/document.rs +++ b/src/components/script/dom/document.rs @@ -148,7 +148,7 @@ impl CacheableWrapper for AbstractDocument { } impl BindingObject for AbstractDocument { - fn GetParentObject(&self, cx: *JSContext) -> @mut CacheableWrapper { + fn GetParentObject(&self, cx: *JSContext) -> Option<@mut CacheableWrapper> { do self.with_mut_base |doc| { doc.GetParentObject(cx) } @@ -183,10 +183,10 @@ impl CacheableWrapper for Document { } impl BindingObject for Document { - fn GetParentObject(&self, _cx: *JSContext) -> @mut CacheableWrapper { + fn GetParentObject(&self, _cx: *JSContext) -> Option<@mut CacheableWrapper> { match self.window { - Some(win) => win as @mut CacheableWrapper, - None => fail!("whoops") + Some(win) => Some(win as @mut CacheableWrapper), + None => None } } } |