Bug 1006229 - Assert that the AudioBuffer object should not have been handed to JS or have C++ callers neuter its typed array; r=padenot

This commit is contained in:
Ehsan Akhgari 2014-05-19 23:12:47 -04:00
parent 7e96ed6dba
commit a48b296d88

View File

@ -183,6 +183,8 @@ AudioBuffer::CopyToChannel(JSContext* aJSContext, const Float32Array& aSource,
void
AudioBuffer::SetRawChannelContents(uint32_t aChannel, float* aContents)
{
MOZ_ASSERT(!GetWrapperPreserveColor() && !mSharedChannels,
"The AudioBuffer object should not have been handed to JS or have C++ callers neuter its typed array");
PodCopy(JS_GetFloat32ArrayData(mJSChannels[aChannel]), aContents, mLength);
}