Bug 1476695 - Return minimum and maximum 32bits float for AudioParam.{minValue,maxValue} that used to return infinity. r=karlt
authorPaul Adenot <paul@paul.cx>
Mon, 16 Jul 2018 17:56:16 +0200
changeset 821118 30f6da1b0aba8026d75dce04c6f0ecb4e801ca8f
parent 821117 0ae34db4c34ffb8f4f5dd5123acca6c24feaf72e
child 821119 1ae4395e7cf7ea1c28781cec256cac08d7734ef1
push id117018
push userbmo:sfoster@mozilla.com
push dateSat, 21 Jul 2018 04:05:10 +0000
reviewerskarlt
bugs1476695
milestone63.0a1
Bug 1476695 - Return minimum and maximum 32bits float for AudioParam.{minValue,maxValue} that used to return infinity. r=karlt MozReview-Commit-ID: 2eDNA3HU1j5
dom/media/webaudio/AudioParam.h
--- a/dom/media/webaudio/AudioParam.h
+++ b/dom/media/webaudio/AudioParam.h
@@ -24,18 +24,18 @@ class AudioParam final : public nsWrappe
 {
   virtual ~AudioParam();
 
 public:
   AudioParam(AudioNode* aNode,
              uint32_t aIndex,
              const char* aName,
              float aDefaultValue,
-             float aMinValue = -std::numeric_limits<float>::infinity(),
-             float aMaxValue = std::numeric_limits<float>::infinity());
+             float aMinValue = std::numeric_limits<float>::lowest(),
+             float aMaxValue = std::numeric_limits<float>::max());
 
   NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
   NS_IMETHOD_(MozExternalRefCountType) Release(void);
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AudioParam)
 
   AudioContext* GetParentObject() const
   {
     return mNode->Context();