[Webkit-unassigned] [Bug 112521] ScriptProcessorNode is garbage collected while still active if unreachable
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Mar 17 17:19:51 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=112521
Kentaro Hara <haraken at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #193473|review? |review-
Flag| |
--- Comment #2 from Kentaro Hara <haraken at chromium.org> 2013-03-17 17:22:15 PST ---
(From update of attachment 193473)
View in context: https://bugs.webkit.org/attachment.cgi?id=193473&action=review
A right way to fix the GC problem would be:
(1) Make AudioNode an ActiveDOMObject.
(2) Override hasPendingActivity() like this:
bool AudioNode::hasPendingActivity() {
return !m_isDisabled && (m_connectionRefCount > 0);
}
GC is implemented so that it skips active DOM objects that have pending activities, so you can use the mechanism. See mediasource/MediaSource.{h,cpp} for more details.
Then you don't need to add custom bindings.
> LayoutTests/webaudio/javascriptaudionode.html:87
> +// borrowed from other tests.
> +function gc()
> +{
> + if (window.GCController)
> + return GCController.collect();
> +
> + for (var i = 0; i < 10000; i++) {
> + var s = new String("abc");
> + }
> +}
You can include fast/js/resources/js-test-pre.js and use gc() defined there.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list