diff options
author | Josh Matthews <josh@joshmatthews.net> | 2013-07-30 14:51:16 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2013-07-30 16:30:46 -0400 |
commit | a2bdab7989bf39fa5db4cdedc21884ca6018036f (patch) | |
tree | 74051c69466d57a603ae028a9e2dfbcd9fcab611 /src/components/script/dom/document.rs | |
parent | 5546f2105bea0a3155a1090f3a9a8dfb65c7b47d (diff) | |
download | servo-a2bdab7989bf39fa5db4cdedc21884ca6018036f.tar.gz servo-a2bdab7989bf39fa5db4cdedc21884ca6018036f.zip |
Generate bindings for Window.
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 } } } |