• Michael Lippautz's avatar
    Revert "[heap] Run phantom handle callbacks on tear down" · d8d2533d
    Michael Lippautz authored
    This reverts commit fa65063a.
    
    Reason for revert:
    This changes API contract with Blink as some state is destroyed before
    actually tearing down the Isolate. Flushing the second round tasks
    then tries to access various state that is already gone on the Blink
    side. See bugs.
    
    Bug: chromium:893944, chromium:893549, chromium:890631
    
    Original change's description:
    > [heap] Run phantom handle callbacks on tear down
    >
    > Pending phantom handle callbacks are not reliably executed if the heap
    > shuts down. This can cause to memory leaks or other unwanted behaviour,
    > like in wasm where the NativeModules (held in Managed objects
    > implemented via phantom handles) unregister from the WasmEngine in the
    > second-pass callback. This must be executed before tearing down the
    > WasmEngine.
    >
    > This CL fixes this by running pending callback synchronously on heap
    > tear down.
    >
    > R=ulan@chromium.org, mlippautz@chromium.org
    >
    > Bug: v8:8208
    > Change-Id: I27b630c4d8f1fb12309040ea2179b64eed38710a
    > Reviewed-on: https://chromium-review.googlesource.com/1249101
    > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#56286}
    
    TBR=ulan@chromium.org,mlippautz@chromium.org,clemensh@chromium.org
    
    Bug: v8:8208
    Change-Id: I4b403fd84473edb8895c3725ff3348574c54247b
    Reviewed-on: https://chromium-review.googlesource.com/c/1274085
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#56542}
    d8d2533d
heap.cc 190 KB