зеркало из https://github.com/mozilla/gecko-dev.git
bug 916387 keep ScriptProcessorNode alive after input is GCed r=padenot
--HG-- extra : rebase_source : a9f5d8f4c33845d1548c2daf53d7aced6d6e668b
This commit is contained in:
Родитель
fda85fcc8b
Коммит
3a15b165c6
|
@ -568,8 +568,9 @@ ScriptProcessorNode::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProt
|
|||
void
|
||||
ScriptProcessorNode::UpdateConnectedStatus()
|
||||
{
|
||||
bool isConnected = !(OutputNodes().IsEmpty() && OutputParams().IsEmpty()
|
||||
&& InputNodes().IsEmpty());
|
||||
bool isConnected = mHasPhantomInput ||
|
||||
!(OutputNodes().IsEmpty() && OutputParams().IsEmpty()
|
||||
&& InputNodes().IsEmpty());
|
||||
|
||||
// Events are queued even when there is no listener because a listener
|
||||
// may be added while events are in the queue.
|
||||
|
|
|
@ -62,6 +62,12 @@ public:
|
|||
{
|
||||
UpdateConnectedStatus();
|
||||
}
|
||||
virtual void NotifyHasPhantomInput() override
|
||||
{
|
||||
mHasPhantomInput = true;
|
||||
// No need to UpdateConnectedStatus() because there was previously an
|
||||
// input in InputNodes().
|
||||
}
|
||||
|
||||
virtual void SetChannelCount(uint32_t aChannelCount, ErrorResult& aRv) override
|
||||
{
|
||||
|
@ -105,6 +111,7 @@ private:
|
|||
|
||||
const uint32_t mBufferSize;
|
||||
const uint32_t mNumberOfOutputChannels;
|
||||
bool mHasPhantomInput = false;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
Загрузка…
Ссылка в новой задаче