• Michael Achenbach's avatar
    Revert "[platform][cleanup] Fix --enable-tracing" · 10f4e6c3
    Michael Achenbach authored
    This reverts commit 61367a25.
    
    Reason for revert: http://shortn/_amqTfxgjk0
    
    Original change's description:
    > [platform][cleanup] Fix --enable-tracing
    > 
    > The flag --enable-tracing can be used to measure how much time is spent
    > in a scope. In d8 this flag did not work properly for the following
    > reasons:
    > 
    > * The tracing file is not written when the JavaScript code calls quit().
    > 
    > * The tracing file is not written when the JavaScript code throws an
    > uncaught exception, except if the --throws flag is passed to d8.
    > 
    > The reason for these two issues is that both call Shell::Exit(), which
    > end d8 immediately without calling any destructors. In addition I moved
    > in a recent CL the destruction of the platform after the destruction of
    > the file handle for the tracing file. Thereby the tracing file did not
    > get filled with content even destructors were executed.
    > 
    > With this CL I also call the destructors of the platform and of the file
    > handle in the Shell::Exit() function. For this I make Shell::Exit()
    > platform independent and let it call the platform dependent
    > Shell::OSExit() at the end.
    > 
    > R=​rmcilroy@chromium.org
    > 
    > Change-Id: I14425b6a5c25b757211bc8b9959a9cc8bfa0602c
    > Reviewed-on: https://chromium-review.googlesource.com/789038
    > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
    > Commit-Queue: Andreas Haas <ahaas@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#49659}
    
    TBR=rmcilroy@chromium.org,ahaas@chromium.org
    
    Change-Id: I17c6f19c38cb337b00707f606f267b52b7f2c1e6
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Reviewed-on: https://chromium-review.googlesource.com/792991Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
    Commit-Queue: Michael Achenbach <machenbach@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49663}
    10f4e6c3
d8.cc 117 KB