• Wez's avatar
    [Fuchsia] Fix leak of kernel job object per-Context. · 5c40bf76
    Wez authored
    ContextProviderImpl incorrectly assumed that LaunchProcess() would
    take ownership of the zx::job specified in the LaunchOptions. Fix the
    provider not let the zx::job handle be closed after launch.
    
    To support testing of this fix, add a ScopedDefaultJobForTest helper to
    //base, to allow the handle returned by base::GetDefaultJob() (which
    ContextProviderImpl creates a per-Context job under) to be overridden
    for a given scope.
    
    Bug: 927403
    Change-Id: I83cc6119657d82fc8d4c7a62081a1c04938a70b5
    Reviewed-on: https://chromium-review.googlesource.com/c/1450614
    Auto-Submit: Wez <wez@chromium.org>
    Reviewed-by: default avatarKevin Marshall <kmarshall@chromium.org>
    Commit-Queue: Wez <wez@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#628499}
    5c40bf76
context_provider_impl_unittest.cc 11 KB