mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 877820 - Improve the argument checking for OfflineAudioContext's sampleRate argument; r=roc
This commit is contained in:
parent
cfd4629d99
commit
81dc335548
4
content/media/test/crashtests/877820.html
Normal file
4
content/media/test/crashtests/877820.html
Normal file
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user