зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1458979 - Update AudioBuffer's throw errors according to spec. r=dminor
MozReview-Commit-ID: GtDHG1evFfD --HG-- extra : rebase_source : 31755230b4207e55d7a4cea0bcbaa884b9b84fb5
This commit is contained in:
Родитель
d5d4c1b840
Коммит
dbb6212da3
|
@ -331,7 +331,7 @@ AudioBuffer::CopyFromChannel(const Float32Array& aDestination, uint32_t aChannel
|
|||
end += length;
|
||||
if (aChannelNumber >= NumberOfChannels() ||
|
||||
!end.isValid() || end.value() > Length()) {
|
||||
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,7 @@ AudioBuffer::CopyToChannel(JSContext* aJSContext, const Float32Array& aSource,
|
|||
end += length;
|
||||
if (aChannelNumber >= NumberOfChannels() ||
|
||||
!end.isValid() || end.value() > Length()) {
|
||||
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -406,7 +406,7 @@ AudioBuffer::GetChannelData(JSContext* aJSContext, uint32_t aChannel,
|
|||
ErrorResult& aRv)
|
||||
{
|
||||
if (aChannel >= NumberOfChannels()) {
|
||||
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче