Closed Bug 916387 Opened 11 years ago Closed 9 years ago

ScriptProcessorNode stops calling onaudioprocess when a connected input is GCed.

Categories

(Core :: Web Audio, defect, P2)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(4 files)

Load testcase, then click "Minimize memory usage" in about:memory.

http://lists.w3.org/Archives/Public/public-audio/2013JulSep/1824.html
"
> If an AudioNode connected to the ScriptProcessorNode is deleted
> because it has no references, then the ScriptProcessNode will stop
> firing onaudioprocess at the time when the connected node is deleted.

I don't think so. In this case, the observable behavior that must be
preserved is that the AudioNode is connected and the ScriptProcessorNode
keeps dispatching onaudioprocess. Automatic removal of the AudioNode can
only be done insofar as we preserve that observable behavior. In other
words, the onaudioprocess event must keep firing."

http://lists.w3.org/Archives/Public/public-audio/2013JulSep/1835.html
"
> I don't really see how you can fix it in this case other than by making an
> AudioNode + ScriptProcessorNode pair an uncollectable cycle that leaks
> forever if you release it.

That's what we do."

We can collect the AudioNode, but we'd have to tell the ScriptProcessorNode that it has an input that will never be removed (because there are no references to the input).
Priority: -- → P2
Blocks: 966322
Blocks: 990841
Blocks: 1061220
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.
Attachment #8644198 - Flags: review?(padenot)
Zero output channels are used on ScriptProcessorNodes to improve efficiency in
tests when output is not required.
Attachment #8644200 - Flags: review?(padenot)
Assignee: nobody → karlt
Attachment #8644198 - Flags: review?(padenot) → review+
Attachment #8644199 - Flags: review?(padenot) → review+
Attachment #8644200 - Flags: review?(padenot) → review+
Flags: in-testsuite+
Blocks: 1202656
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: