commit | 071df33edf2c8b4375fa432a83953359f93ea9e4 | [log] [tgz] |
---|---|---|
author | Raymond Toy <rtoy@chromium.org> | Fri Jan 12 00:34:43 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jan 12 00:34:43 2018 |
tree | d9d7449d96b0ea2c64549bc139bf06419224dd9f | |
parent | 08639632d28dcd98283430cc8c6f562da62a9590 [diff] |
Keep AudioHandlers alive until they can be safely deleted. When an AudioNode is disposed, the handler is also disposed. But add the handler to the orphan list so that the handler stays alive until the context can safely delete it. If we don't do this, the handler may get deleted while the audio thread is processing the handler (due to, say, channel count changes and such). For an realtime context, always save the handler just in case the audio thread is running after the context is marked as closed (because the audio thread doesn't instantly stop when requested). For an offline context, only need to do this when the context is running because the context is guaranteed to be stopped if we're not in the running state. Hence, there's no possibility of deleting the handler while the graph is running. This is a revert of https://chromium-review.googlesource.com/c/chromium/src/+/860779, with a fix for the leak. Bug: 780919 Change-Id: Ifb6b5fcf3fbc373f5779256688731245771da33c Reviewed-on: https://chromium-review.googlesource.com/862723 Reviewed-by: Hongchan Choi <hongchan@chromium.org> Commit-Queue: Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#528829}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .