diff options
author | bors-servo <release+servo@mozilla.com> | 2013-07-30 13:57:26 -0700 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2013-07-30 13:57:26 -0700 |
commit | 7911ae56954cc0ff03f77ff901233a411a30f1e7 (patch) | |
tree | 74051c69466d57a603ae028a9e2dfbcd9fcab611 /src/components/script/dom/document.rs | |
parent | 0c105b5307bb69e8d43a1c6263b09c1b8e52c355 (diff) | |
parent | a2bdab7989bf39fa5db4cdedc21884ca6018036f (diff) | |
download | servo-7911ae56954cc0ff03f77ff901233a411a30f1e7.tar.gz servo-7911ae56954cc0ff03f77ff901233a411a30f1e7.zip |
auto merge of #645 : jdm/servo/window, r=jdm
This one also looks larger than necessary because GetParentObject needed to be changed to return an Option.
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 } } } |