From a2bdab7989bf39fa5db4cdedc21884ca6018036f Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 30 Jul 2013 14:51:16 -0400 Subject: Generate bindings for Window. --- src/components/script/dom/document.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/components/script/dom/document.rs') 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 } } } -- cgit v1.2.3