mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 876834 - Do not accept sampling rates which we won't be able to handle when creating an OfflineAudioContext; r=roc
This commit is contained in:
parent
f8dd46986c
commit
042b85c631
4
content/media/test/crashtests/876834.html
Normal file
4
content/media/test/crashtests/876834.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
OfflineAudioContext(0, 0, 3229622);
|
||||
</script>
|
@ -24,3 +24,4 @@ load 875596.html
|
||||
load 875911.html
|
||||
load 876249.html
|
||||
load 876252.html
|
||||
load 876834.html
|
||||
|
@ -109,7 +109,7 @@ AudioContext::Constructor(const GlobalObject& aGlobal,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (aSampleRate <= 0.0f) {
|
||||
if (aSampleRate <= 0.0f || aSampleRate >= TRACK_RATE_MAX) {
|
||||
// The DOM binding protects us against infinity and NaN
|
||||
aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user