• Clemens Hammacher's avatar
    [wasm] Fix deadlock in async compilation · 231a96bb
    Clemens Hammacher authored
    This fixes a deadlock related to throttling: It can happen that all
    background tasks detect that they should not produce more work because
    of throttling (!CanAcceptWork()). Reducing the number of running
    background tasks is done in a later step (OnBackgroundTaskStopped).
    If the finisher task finishes all outstanding units between these two
    calls, it will not schedule another background compilation task, but
    all background compilation tasks will quit, hence compilation will
    never finish.
    
    Fixing this should allow us to reenable the 'wasm-finish-compilation'
    test: https://crrev.com/c/999632
    
    R=ahaas@chromium.org
    
    Bug: chromium:824681
    Change-Id: I967e4d6b2917d369dd49bb80ce4bef552d10b371
    Reviewed-on: https://chromium-review.googlesource.com/1002174
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52483}
    231a96bb
module-compiler.cc 130 KB