• Francois Doray's avatar
    [threadpool] Fix --disable-best-effort-tasks and add test. · 4ee667fd
    Francois Doray authored
    The --disable-best-effort-tasks switch was only read when a task
    execution fence was created. This CL ensure that it is read even if
    there is no task execution fence. It also adds a test to verify the
    behavior and avoid future regressions.
    
    The TabCapturePerformanceTest.Performance test used
    --disable-best-effort-tasks to ensure that the test can pass without
    BEST_EFFORT tasks. Prior to this CL, this flag only prevented
    BEST_EFFORT tasks from running in the browser process. With this CL, it
    also prevents BEST_EFFORT tasks from running in renderers and utility
    processes. Since the test needs BEST_EFFORT tasks to run in utility
    processes for tracing, this CL changes --disable-best-effort-tasks
    to ScopedBestEffortExecutionFence. The ScopedBestEffortExecutionFence
    only prevents BEST_EFFORT tasks from running in the process where it
    is used (keeps the test's existing behavior).
    
    Bug: 839110
    Change-Id: I4ef104ccabb81840cbb48d309e1ed3baaa20feda
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872654Reviewed-by: default avatarYuri Wiitala <miu@chromium.org>
    Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
    Commit-Queue: François Doray <fdoray@chromium.org>
    Auto-Submit: François Doray <fdoray@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#711676}
    4ee667fd
thread_pool_impl_unittest.cc 54.4 KB