commit | 89f07c0538eed5edb94f86582716b6b9b21d1e07 | [log] [tgz] |
---|---|---|
author | Evan Birenbaum <birenbaum@google.com> | Sat Jan 18 02:25:37 2020 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Sat Jan 18 02:25:37 2020 +0000 |
tree | 35bf948018f82dc5e5638a7ceb6447636e4983da | |
parent | 801108c9aee69657eacb6d60a94735636426f857 [diff] |
[scenic] Add ObjectLinker::Link::ReleaseToken(). The new Flatland API functions for releasing a parent or child link also return the link token to the caller so that a new link can be established. Right now, the ObjectLinker consumes these tokens, but as soon as the link is resolved, the tokens are discarded. This change: 1. Makes the ObjectLinker hold onto the tokens in the resolved Endpoint rather than discarding them on link resolution. 2. Adds a function that allows the link holder to release the token. When a link releases its token, it is invalidated, which results in the link_invalidated callback being called if the link was initialized. If the link was resolved, meaning it has an initialized peer, the peer will be "unresolved". Unresolving a peer means: 1. The peer's link_invalidated callback will be called, but not erased. 2. The peer will be put back into the "initialized" state, meaning it retains its token and callbacks. Even though the peer receives the link_invalidated callback, it does not need to be initialized again. For example, if the released token is then used to create a new link, the peer will receive the link_resolved callback again. This means that any state set up in the link_resolved callback should be torn down in the link_invalidated callback. Fixed: 43745 TEST=fx shell runtests -t gfx_unittests Change-Id: I3d27702e611402de22c2a99dc68f1fc07e51f374
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.