commit | 24de0d7db7c7f8a4a5a14171a218ac4f1cff1682 | [log] [tgz] |
---|---|---|
author | Fady Samuel <fsamuel@google.com> | Mon Jan 20 20:24:17 2020 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Mon Jan 20 20:24:17 2020 +0000 |
tree | 7dd802c5ed056f5f31f60c89a81a217fc80432c1 | |
parent | 88e8ebfbcc70c2c52f1c7ed0f0320d7a5ca86ba4 [diff] |
[components] Generalize Breakpoints StartComponentTree Prior to this CL, there was no way for a realm to guarantee it can install breakpoints prior to its children starting. This CL generalizes the breakpoints StartComponentTree API such that it applies to every realm that requests a BreakpointsSystem. This CL makes a number of refactors in order to support generalized StartComponentTree. 1. BreakpointSystem => BreakpointSystemFactory, ScopedBreakpointSystem => BreakpointSystem. ScopedBreakpointSystem is no longer a special case. All instances of BreakpointSystem have an optional scope. Instead, we have a BreakpointSystemFactory that constructs a BreakpointSystem when a component is resolved that requests the BreakpointSystem. A breakpoint is set on `ResolveInstance` within that scope preventing children from starting up until StartComponentTree is called within that scope. BreakpointSystemFactory maintains a mapping from Option<AbsoluteMoniker> => BreakpointSystem at `ResolveInstance` time. When requested by the realm's root, that instance is used to serve the requests coming from the component. 2. Internally, BreakpointSystem holds onto an `InvocationReceiver` for `ResolveInstance` until StartComponentTree is called. At that time, the receiver is simply dropped permitting children to be started. 3. In BreakpointSystemClient, `start_component_manager` is renamed to `start_component_tree` and now applies to all levels. 4. `bind_single_instance` now calls `Realm::resolve_decl` to resolve the `ComponentDecl` because it may dispatch a `ResolveInstance` event. `ResolveInstance` events are expected to always be dispatched before `BeforeStartInstance` events. 5. Components that use the BreakpointSystem must now explicitly call `start_component_tree` if they expect their children to be started. Change-Id: I86bfec7f17cce9f2928623ae3ac4d33258c405de
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
See Getting Started.
See fuchsia.dev.