bug 916387 add a notification of garbage collected input node r=padenot

The effects of garbage collection must not be observable.  We can collect an
AudioNode if it is not going to cause any further changes, but we must keep
any current effects.

--HG--
extra : rebase_source : f7ce500de2afd4f6cdff79c30c99a0ee8e74ab40
This commit is contained in:
Karl Tomlinson 2015-08-06 14:15:40 +12:00
Родитель 487efc8f27
Коммит fda85fcc8b
2 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -173,6 +173,8 @@ AudioNode::DisconnectFromGraph()
// It doesn't matter which one we remove, since we're going to remove all
// entries for this node anyway.
output->mInputNodes.RemoveElementAt(inputIndex);
// This effects of this connection will remain.
output->NotifyHasPhantomInput();
}
while (!mOutputParams.IsEmpty()) {

Просмотреть файл

@ -100,6 +100,11 @@ public:
// Called after input nodes have been explicitly added or removed through
// the Connect() or Disconnect() methods.
virtual void NotifyInputsChanged() {}
// Indicate that the node should continue indefinitely to behave as if an
// input is connected, even though there is no longer a corresponding entry
// in mInputNodes. Called after an input node has been removed because it
// is being garbage collected.
virtual void NotifyHasPhantomInput() {}
// The following two virtual methods must be implemented by each node type
// to provide their number of input and output ports. These numbers are