Clear context from orphan handlers when BaseAudioContext is going away
When preparing to collect a BaseAudioContext, go through all the rendering_orphan_handlers_ and deletable_orphan_handlers_ and remove the context from the handler. This ensures that these handlers no longer have references to the context when the BaseAudioContext is destroyed because in some cases, these orphan handlers will get pulled and access the context, which is already gone. Clearing these in a prefinalizer ensures these orphan handlers don't try to touch the context. Manually verified that the repro case no longer reproduces. Bug: 1062247 Change-Id: I50d083743903eb9544e09aa1ee912fc880331501 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107806Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Hongchan Choi <hongchan@chromium.org> Commit-Queue: Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#751814}
Showing
Please register or sign in to comment