зеркало из https://github.com/mozilla/gecko-dev.git
Bug 793294 follow-up: Hold on to JS objects early in AudioBuffer::InitializeBuffers
This commit is contained in:
Родитель
c536c277ca
Коммит
8889020fa0
|
@ -62,6 +62,8 @@ AudioBuffer::~AudioBuffer()
|
|||
bool
|
||||
AudioBuffer::InitializeBuffers(uint32_t aNumberOfChannels, JSContext* aJSContext)
|
||||
{
|
||||
NS_HOLD_JS_OBJECTS(this, AudioBuffer);
|
||||
|
||||
if (!mChannels.SetCapacity(aNumberOfChannels)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -73,8 +75,6 @@ AudioBuffer::InitializeBuffers(uint32_t aNumberOfChannels, JSContext* aJSContext
|
|||
mChannels.AppendElement(array);
|
||||
}
|
||||
|
||||
NS_HOLD_JS_OBJECTS(this, AudioBuffer);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче