Bug 1308437 - Part 1: Change the exception thrown by 'setValueCurve' on non-finite elements to TypeError. r=dminor
authorBeekill95 <nnn_bikiu0707@yahoo.com>
Mon, 06 Feb 2017 22:14:58 +0700
changeset 341350 59f634bb78c4904e9ad0072e47b2aa9355638712
parent 341349 c16d9ee39ff4720a2d428ddd8b3bdc53183a2ad9
child 341351 845451c03a199550c060f4b1866d35da58f97093
push id86694
push usercbook@mozilla.com
push dateWed, 08 Feb 2017 14:56:12 +0000
treeherdermozilla-inbound@250c680482eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdminor
bugs1308437
milestone54.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 1308437 - Part 1: Change the exception thrown by 'setValueCurve' on non-finite elements to TypeError. r=dminor
dom/media/webaudio/AudioEventTimeline.h
--- a/dom/media/webaudio/AudioEventTimeline.h
+++ b/dom/media/webaudio/AudioEventTimeline.h
@@ -188,17 +188,17 @@ public:
 
     if (aEvent.mType == AudioTimelineEvent::SetValueCurve) {
       if (!aEvent.mCurve || !aEvent.mCurveLength) {
         aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
         return false;
       }
       for (uint32_t i = 0; i < aEvent.mCurveLength; ++i) {
         if (!IsValid(aEvent.mCurve[i])) {
-          aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
+          aRv.Throw(NS_ERROR_TYPE_ERR);
           return false;
         }
       }
     }
 
     bool timeAndValueValid = IsValid(aEvent.mValue) &&
                              IsValid(aEvent.mDuration);
     if (!timeAndValueValid) {