diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2018-09-03 20:30:06 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2018-09-03 20:31:52 +0530 |
commit | 28c21421ca2cbf32e5f92cb6756e400bc639c036 (patch) | |
tree | 2dd87c93280bb4711dc15b4eddad1f2b5ca05724 /components/script/dom/baseaudiocontext.rs | |
parent | 0ac861ca94970070dfa74120ef4f4286001f2523 (diff) | |
download | servo-28c21421ca2cbf32e5f92cb6756e400bc639c036.tar.gz servo-28c21421ca2cbf32e5f92cb6756e400bc639c036.zip |
Throw on out-of-bounds channelCount in AudioNodes
Diffstat (limited to 'components/script/dom/baseaudiocontext.rs')
-rw-r--r-- | components/script/dom/baseaudiocontext.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/baseaudiocontext.rs b/components/script/dom/baseaudiocontext.rs index 9513a0b22d1..15316e1b89d 100644 --- a/components/script/dom/baseaudiocontext.rs +++ b/components/script/dom/baseaudiocontext.rs @@ -317,7 +317,7 @@ impl BaseAudioContextMethods for BaseAudioContext { event_handler!(statechange, GetOnstatechange, SetOnstatechange); /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createoscillator - fn CreateOscillator(&self) -> DomRoot<OscillatorNode> { + fn CreateOscillator(&self) -> Fallible<DomRoot<OscillatorNode>> { OscillatorNode::new( &self.global().as_window(), &self, @@ -326,7 +326,7 @@ impl BaseAudioContextMethods for BaseAudioContext { } /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-creategain - fn CreateGain(&self) -> DomRoot<GainNode> { + fn CreateGain(&self) -> Fallible<DomRoot<GainNode>> { GainNode::new(&self.global().as_window(), &self, &GainOptions::empty()) } @@ -360,7 +360,7 @@ impl BaseAudioContextMethods for BaseAudioContext { } // https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffersource - fn CreateBufferSource(&self) -> DomRoot<AudioBufferSourceNode> { + fn CreateBufferSource(&self) -> Fallible<DomRoot<AudioBufferSourceNode>> { AudioBufferSourceNode::new( &self.global().as_window(), &self, |