Bug 877820 - Improve the argument checking for OfflineAudioContext's sampleRate argument; r=roc

This commit is contained in:
Ehsan Akhgari 2013-05-30 20:54:07 -04:00
Родитель 507a189f9d
Коммит 4eb33f438e
3 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,4 @@
<script>
o1 = new window.OfflineAudioContext(2, 5, 0.39);
window.location.reload();
</script>

Просмотреть файл

@ -30,3 +30,4 @@ load 876215.html
load 876249.html
load 876252.html
load 876834.html
load 877820.html

Просмотреть файл

@ -106,7 +106,7 @@ AudioContext::Constructor(const GlobalObject& aGlobal,
if (aNumberOfChannels == 0 ||
aNumberOfChannels > WebAudioUtils::MaxChannelCount ||
aLength == 0 ||
aSampleRate <= 0.0f ||
aSampleRate <= 1.0f ||
aSampleRate >= TRACK_RATE_MAX) {
// The DOM binding protects us against infinity and NaN
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);