• Andreas Haas's avatar
    Revert "[wasm] Run foreground compilation tasks as normal tasks" · 89154bf6
    Andreas Haas authored
    This reverts commit 1520a851.
    
    Reason for revert: This CL does not do what it should. All tasks which access the isolate have to be cancelable to guarantee that the isolate still exists when the task is executed. Foreground compilation tasks access the isolate, so they cannot be just normal tasks.
    
    Original change's description:
    > [wasm] Run foreground compilation tasks as normal tasks
    > 
    > This CL makes foreground compilation tasks normal (i.e. not cancelable)
    > again, because otherwise a deadlock can happen. I think the reason why
    > the foreground tasks were cancelable was to make sure that all tasks
    > either finish correctly or get canceled. However, since the isolate can
    > only shut down on the main thread, this means that the foreground task
    > should have already finished when the isolate shuts down, or it should
    > not have started at all. I reordered the deletion of the AsyncCompileJob
    > though to make sure that an AsyncCompileJob is removed from
    > CompilationManager before its promise is resolved.
    > 
    > Here is the deadlock: The JS code which is executed after a promise is
    > resolved is executed within the task which resolves the promise. In case
    > of async compilation this means that some JS code is executed within a
    > CompileTask. In JS, the shutdown of the isolate can be triggered. During
    > the shutdown of the isolate, the CancelableTaskManager waits for all
    > registered cancelable tasks to complete, including the CompileTask of
    > async compilation. This means that the CancelableTaskManager waits for
    > itself to finish, which is a deadlock.
    > 
    > R=​clemensh@chromium.org, mtrofin@chromium.org
    > 
    > Change-Id: I9f8c7fb2cfc5b9bfc53c761010b1590293bb82c9
    > Reviewed-on: https://chromium-review.googlesource.com/554733
    > Commit-Queue: Andreas Haas <ahaas@chromium.org>
    > Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
    > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#46343}
    
    TBR=mtrofin@chromium.org,ahaas@chromium.org,clemensh@chromium.org
    
    Change-Id: I60fab90b46d70c703d827816503e7e23b8c50251
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Reviewed-on: https://chromium-review.googlesource.com/558284Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46353}
    89154bf6
Name
Last commit
Last update
..
loop-stack-check.js Loading commit data...
regress-5860.js Loading commit data...
regress-709684.js Loading commit data...
regress-712569.js Loading commit data...
regression-02256.js Loading commit data...
regression-02256b.js Loading commit data...
regression-02862.js Loading commit data...
regression-5531.js Loading commit data...
regression-5800.js Loading commit data...
regression-5884.js Loading commit data...
regression-6054.js Loading commit data...
regression-6164.js Loading commit data...
regression-643595.js Loading commit data...
regression-644682.js Loading commit data...
regression-647649.js Loading commit data...
regression-648079.js Loading commit data...
regression-651961.js Loading commit data...
regression-654377.js Loading commit data...
regression-663994.js Loading commit data...
regression-666741.js Loading commit data...
regression-667745.js Loading commit data...
regression-670683.js Loading commit data...
regression-674447.js Loading commit data...
regression-680938.js Loading commit data...
regression-684858.js Loading commit data...
regression-688876.js Loading commit data...
regression-689450.js Loading commit data...
regression-694433.js Loading commit data...
regression-698587.js Loading commit data...
regression-699485.js Loading commit data...
regression-702460.js Loading commit data...
regression-702839.js Loading commit data...
regression-703568.js Loading commit data...
regression-708714.js Loading commit data...
regression-710844.js Loading commit data...
regression-711203.js Loading commit data...
regression-715216-a.js Loading commit data...
regression-715216-b.js Loading commit data...
regression-717056.js Loading commit data...
regression-717194.js Loading commit data...
regression-719175.js Loading commit data...
regression-722445.js Loading commit data...
regression-724846.js Loading commit data...
regression-724851.js Loading commit data...
regression-724972.js Loading commit data...
regression-727219.js Loading commit data...
regression-727222.js Loading commit data...
regression-727560.js Loading commit data...
regression-729991.js Loading commit data...
regression-731351.js Loading commit data...
regression-734108.js Loading commit data...
regression-734246.js Loading commit data...
regression-734345.js Loading commit data...
regression-736584.js Loading commit data...
regression-737069.js Loading commit data...