Bug 1413284 - A RangeError exception is thrown if start/stop is called with a out of range param r=padenot
authormaxLanglade <maxime.langlade@etu.univ-lyon1.fr>
Wed, 18 Jul 2018 21:32:14 +0200
changeset 427472 4a6d4d1b11fde4dd848f6c28137a557cea20faad
parent 427471 9fcf0dece71d6be939fe1b3b1361131bcdcec6f4
child 427473 40195349a292d8a0530b25947ae7c2debd029803
push id34306
push usercsabou@mozilla.com
push dateFri, 20 Jul 2018 21:41:18 +0000
treeherdermozilla-central@d6a5e8aea651 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1413284
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1413284 - A RangeError exception is thrown if start/stop is called with a out of range param r=padenot MozReview-Commit-ID: G65bFgMu10D
dom/media/webaudio/ConstantSourceNode.cpp
--- a/dom/media/webaudio/ConstantSourceNode.cpp
+++ b/dom/media/webaudio/ConstantSourceNode.cpp
@@ -205,17 +205,17 @@ ConstantSourceNode::DestroyMediaStream()
   }
   AudioNode::DestroyMediaStream();
 }
 
 void
 ConstantSourceNode::Start(double aWhen, ErrorResult& aRv)
 {
   if (!WebAudioUtils::IsTimeValid(aWhen)) {
-    aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
+    aRv.Throw(NS_ERROR_RANGE_ERR);
     return;
   }
 
   if (mStartCalled) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
   }
   mStartCalled = true;
@@ -229,17 +229,17 @@ ConstantSourceNode::Start(double aWhen, 
 
   MarkActive();
 }
 
 void
 ConstantSourceNode::Stop(double aWhen, ErrorResult& aRv)
 {
   if (!WebAudioUtils::IsTimeValid(aWhen)) {
-    aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
+    aRv.Throw(NS_ERROR_RANGE_ERR);
     return;
   }
 
   if (!mStartCalled) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
   }