Bug 1265400 - Use unsigned long for AudioBuffer length and numberOfChannels; r=smaug
authorDan Minor <dminor@mozilla.com>
Wed, 20 Apr 2016 12:32:17 -0400
changeset 332224 fc8b1d87af43d7e5232e4d619651e293fa778527
parent 332223 fb4131318add3451da9aea822130078ad4d02c18
child 332225 280b570936bb63f08ffb135d7dafb8f4d4153973
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1265400
milestone48.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 1265400 - Use unsigned long for AudioBuffer length and numberOfChannels; r=smaug 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);