commit | 214678c7af4b7b3de4ca2cc95c1cc37ff7bceb2f | [log] [tgz] |
---|---|---|
author | Jeremy Roman <jbroman@chromium.org> | Fri Jan 11 19:55:06 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jan 11 19:55:06 2019 |
tree | ff68fa5591f48cdc952eaa64417ad70fbb93b777 | |
parent | dcc0fd9fc4cdcb05eb07a2efd2f083c88f1e31c6 [diff] |
Revert "[Reland] webaudio: Always delete handlers in a non-nestable task on the main thread." This reverts commit 02090026451f32dfc651f6dd2e384bf2c4f45b69. Reason for revert: Causing crashes in canary. Original change's description: > [Reland] webaudio: Always delete handlers in a non-nestable task on the main thread. > > Deleting handlers does considerable non-trivial work that requires the > graph lock. Allowing this to happen during finalization introduces > considerable complexity because it can happen during any GC heap allocation, > including ones that occur while the graph lock is already held. > > Instead, when the last reference is dropped, the handler is not deleted > immediately, but a non-nestable task to delete it is enqueued. Since the > task is non-nestable, it will not run while the graph lock is held by the > main thread (and if it is held by another thread, it will block on it). > > This slightly extends the lifetime of audio handlers, during which time > it is illegal to take a new reference (and RefCounted checks this in > debug builds). So a flag is set in the destructor (though it could be > sensibly set as early as the ref count reaches zero) that prevents the > handler from adding itself to the tail processing queue if it is already > being destroyed. > > The cycle collection layout test is updated to handle the fact that the > handler count does not go to zero immediately on GC, but shortly thereafter. > This has been done by merging with another recently added unit test, which > tests something very similar (a cycle of one element). > > The leak detector has been augmented to wait for audio handlers that are > awaiting deletion, if there are any. > > Bug: 884059 > Change-Id: I818bcdbf87dc3e83359ad7a62aa56547dea2d7a5 > Reviewed-on: https://chromium-review.googlesource.com/c/1392109 > Reviewed-by: Kentaro Hara <haraken@chromium.org> > Reviewed-by: Hongchan Choi <hongchan@chromium.org> > Commit-Queue: Jeremy Roman <jbroman@chromium.org> > Cr-Commit-Position: refs/heads/master@{#621840} TBR=jbroman@chromium.org,haraken@chromium.org,hongchan@chromium.org Change-Id: Ib13b613f6fa696935f64362f65eb94cba50acdfd No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 884059,921018 Reviewed-on: https://chromium-review.googlesource.com/c/1407501 Commit-Queue: Jeremy Roman <jbroman@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#622109}
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 .