mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
bindings: Return errors in Result rather than setting an out parameter
Fixes #909.
This commit is contained in:
parent
4b0680a136
commit
73c1a12f30
73 changed files with 891 additions and 550 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
use dom::bindings::codegen::HTMLCollectionBinding;
|
||||
use dom::bindings::utils::{CacheableWrapper, BindingObject, WrapperCache};
|
||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||
use dom::bindings::utils::{DOMString, Fallible};
|
||||
use dom::node::{AbstractNode, ScriptView};
|
||||
use script_task::page_from_context;
|
||||
|
||||
|
@ -44,9 +44,8 @@ impl HTMLCollection {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn NamedItem(&self, _cx: *JSContext, _name: &DOMString, rv: &mut ErrorResult) -> *JSObject {
|
||||
*rv = Ok(());
|
||||
ptr::null()
|
||||
pub fn NamedItem(&self, _cx: *JSContext, _name: &DOMString) -> Fallible<*JSObject> {
|
||||
Ok(ptr::null())
|
||||
}
|
||||
|
||||
pub fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<AbstractNode<ScriptView>> {
|
||||
|
@ -54,8 +53,8 @@ impl HTMLCollection {
|
|||
self.Item(index)
|
||||
}
|
||||
|
||||
pub fn NamedGetter(&self, _cx: *JSContext, _name: &DOMString, _found: &mut bool, _rv: &mut ErrorResult) -> *JSObject {
|
||||
ptr::null()
|
||||
pub fn NamedGetter(&self, _cx: *JSContext, _name: &DOMString, _found: &mut bool) -> Fallible<*JSObject> {
|
||||
Ok(ptr::null())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue