Bug 1265400 - Use unsigned long for AudioBuffer length and numberOfChannels; r?padenot draft
authorDan Minor <dminor@mozilla.com>
Wed, 20 Apr 2016 12:32:17 -0400
changeset 354329 8fdf80a03e37a06eb81eed2c79653d007a3589ae
parent 354226 f05a1242fb29023bd7ebc492897ed3d6907733c7
child 518974 4118bdce4485fdf7d1f17502c2df9680b6d1d20b
push id16047
push userdminor@mozilla.com
push dateWed, 20 Apr 2016 17:36:07 +0000
reviewerspadenot
bugs1265400
milestone48.0a1
Bug 1265400 - Use unsigned long for AudioBuffer length and numberOfChannels; r?padenot MozReview-Commit-ID: 47ZDDvj5QrA
dom/media/webaudio/AudioBuffer.h
dom/webidl/AudioBuffer.webidl
--- a/dom/media/webaudio/AudioBuffer.h
+++ b/dom/media/webaudio/AudioBuffer.h
@@ -65,17 +65,17 @@ public:
 
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   float SampleRate() const
   {
     return mSampleRate;
   }
 
-  int32_t Length() const
+  uint32_t Length() const
   {
     return mLength;
   }
 
   double Duration() const
   {
     return mLength / static_cast<double> (mSampleRate);
   }
--- a/dom/webidl/AudioBuffer.webidl
+++ b/dom/webidl/AudioBuffer.webidl
@@ -8,22 +8,22 @@
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 interface AudioBuffer {
 
     readonly attribute float sampleRate;
-    readonly attribute long length;
+    readonly attribute unsigned long length;
 
     // in seconds 
     readonly attribute double duration;
 
-    readonly attribute long numberOfChannels;
+    readonly attribute unsigned long numberOfChannels;
 
     [Throws]
     Float32Array getChannelData(unsigned long channel);
 
     [Throws]
     void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
     [Throws]
     void copyToChannel(Float32Array source, long channelNumber, optional unsigned long startInChannel = 0);