mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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
|
@ -23,7 +23,8 @@ impl HTMLMediaElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CurrentSrc(&self) -> DOMString {
|
||||
|
@ -34,14 +35,16 @@ impl HTMLMediaElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) {
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Preload(&self) -> DOMString {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetPreload(&mut self, _preload: &DOMString, _rv: &mut ErrorResult) {
|
||||
pub fn SetPreload(&mut self, _preload: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Load(&self) {
|
||||
|
@ -63,7 +66,8 @@ impl HTMLMediaElement {
|
|||
0f64
|
||||
}
|
||||
|
||||
pub fn SetCurrentTime(&mut self, _current_time: f64, _rv: &mut ErrorResult) {
|
||||
pub fn SetCurrentTime(&mut self, _current_time: f64) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetDuration(&self) -> f64 {
|
||||
|
@ -78,14 +82,16 @@ impl HTMLMediaElement {
|
|||
0f64
|
||||
}
|
||||
|
||||
pub fn SetDefaultPlaybackRate(&mut self, _default_playback_rate: f64, _rv: &mut ErrorResult) {
|
||||
pub fn SetDefaultPlaybackRate(&mut self, _default_playback_rate: f64) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn PlaybackRate(&self) -> f64 {
|
||||
0f64
|
||||
}
|
||||
|
||||
pub fn SetPlaybackRate(&mut self, _playback_rate: f64, _rv: &mut ErrorResult) {
|
||||
pub fn SetPlaybackRate(&mut self, _playback_rate: f64) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ended(&self) -> bool {
|
||||
|
@ -96,34 +102,40 @@ impl HTMLMediaElement {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn SetAutoplay(&mut self, _autoplay: bool, _rv: &mut ErrorResult) {
|
||||
pub fn SetAutoplay(&mut self, _autoplay: bool) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Loop(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetLoop(&mut self, _loop: bool, _rv: &mut ErrorResult) {
|
||||
pub fn SetLoop(&mut self, _loop: bool) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Play(&self, _rv: &mut ErrorResult) {
|
||||
pub fn Play(&self) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Pause(&self, _rv: &mut ErrorResult) {
|
||||
pub fn Pause(&self) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Controls(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetControls(&mut self, _controls: bool, _rv: &mut ErrorResult) {
|
||||
pub fn SetControls(&mut self, _controls: bool) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Volume(&self) -> f64 {
|
||||
0f64
|
||||
}
|
||||
|
||||
pub fn SetVolume(&mut self, _volume: f64, _rv: &mut ErrorResult) {
|
||||
pub fn SetVolume(&mut self, _volume: f64) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Muted(&self) -> bool {
|
||||
|
@ -137,6 +149,7 @@ impl HTMLMediaElement {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn SetDefaultMuted(&mut self, _default_muted: bool, _rv: &mut ErrorResult) {
|
||||
pub fn SetDefaultMuted(&mut self, _default_muted: bool) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue