-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[component_manager] Ensure Discovered dispatched before Purged
This change fixes a race condition in component destruction where the following occurs: 1. Component is created and added to parent as child. 2. Component is destroyed. 3. Discover action is run for component. In this sequence of operations, the Discover action in #3 will no-op (and error) because the component is in a Destroyed state. This means a Discovered event is never dispatched for the component, even though Destroyed is. This is hypothesized to trigger the crash in the bug. Usually, #2 and #3 happen in the other order, which gives the expected behavior: Discovered event followed by Purged. Fix by forcing the Purge action to register a Discover action. Bug: 78289 Change-Id: Ibd15f8f9fb1b6e7f44b07b9ac04cdfb1ad427e60 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/540483 Commit-Queue: Gary Bressler <[email protected]> Reviewed-by: Fady Samuel <[email protected]>
- Loading branch information
1 parent
af46f1b
commit 68670ea
Showing
2 changed files
with
120 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters