mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 811555 - Make AudioContext.createDelay not accept arguments greater than or equal to 3; r=bzbarsky
--HG-- extra : rebase_source : 5ad2006acb9c27ba7f94c0d1858a19d71cc663c4
This commit is contained in:
parent
7c4b4c24c9
commit
d6aa3be16d
@ -106,7 +106,7 @@ AudioContext::CreateGain()
|
||||
already_AddRefed<DelayNode>
|
||||
AudioContext::CreateDelay(float aMaxDelayTime, ErrorResult& aRv)
|
||||
{
|
||||
if (aMaxDelayTime <= 0.f) {
|
||||
if (aMaxDelayTime <= 0.f || aMaxDelayTime >= 3.f) {
|
||||
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -56,6 +56,9 @@ addLoadEvent(function() {
|
||||
expectException(function() {
|
||||
context.createDelay(0);
|
||||
}, DOMException.NOT_SUPPORTED_ERR);
|
||||
expectException(function() {
|
||||
context.createDelay(3);
|
||||
}, DOMException.NOT_SUPPORTED_ERR);
|
||||
expectException(function() {
|
||||
context.createDelay(-1);
|
||||
}, DOMException.NOT_SUPPORTED_ERR);
|
||||
|
Loading…
Reference in New Issue
Block a user