• Nicholas Hollingum's avatar
    borealis: Changed context_manager_impl to have a unique_ptr<context> · 44af95e5
    Nicholas Hollingum authored
    We will be implementing vm shutdown in the UI, the most expedient way is
    to have a means of telling the context_manager to reset its state. This
    proves somewhat complicated, so we submit this refactoring initially
    which does not change anything functional.
    
    How this works:
     - we make the context a unique_ptr so that we can easily reset state by
       deleting it. This is easier than reinitializing it in place.
     - I removed several redundant fields of the context_manager_impl which
       were used to track state. The state of the manager is now implicit
       in the state of some of its members (particularly, the context and
       the task queue) rather than explicit in those variables.
    
    Bug: b/172006764
    Change-Id: I8f897f125beee6dd5eb55c784c310f133094c180
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2507234
    Commit-Queue: Nic Hollingum <hollingum@google.com>
    Reviewed-by: default avatarDaniel Ng <danielng@google.com>
    Cr-Commit-Position: refs/heads/master@{#823738}
    44af95e5
borealis_context.h 1.83 KB