Use SupportWeakPtr in OfflineAudioDestinationHandler
OfflineAudioDestinationHandler's render thread notifies the main thread when the rendering state changes. In this process, the associated audio context can be deleted when a posted task is performed sometime later in the task runner's queue. By using WeakPtr, the task runner will not perform a scheduled task in the queue when the target object is no longer valid. Bug: 1095584 Test: Locally confirmed that the repro case does not crash after 30 min. Change-Id: Ic1814b97f8d9a8d1027ef04f475112874cfa8137 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2285473Reviewed-by:Robert Sesek <rsesek@chromium.org> Reviewed-by:
Raymond Toy <rtoy@chromium.org> Commit-Queue: Hongchan Choi <hongchan@chromium.org> Cr-Commit-Position: refs/heads/master@{#786381}
Showing
Please register or sign in to comment