• Andreas Haas's avatar
    [inspector] Dispose the isolate in the inspector tests · d9a91da6
    Andreas Haas authored
    At the moment the inspector tests do not dispose the isolate. This is a
    problem because the disposal of the isolate is used to stop the
    execution of background tasks. The missing disposal of the isolate
    caused flaky tests on the bots recently. With this CL the isolates of
    the inspector tests get disposed.
    
    The disposal of the isolate requires the following changes: 1) Store the
    isolate in a unique_ptr so that it gets disposed when the isolate-data
    gets disposed. It is necessary to use the unique_ptr so that the isolate
    gets disposed after other members of isolate-data get disposed.  2)
    Dispose all sessions. The reason is that the sessions require the
    isolate to exist when they get disposed because they own handles.
    Sessions, however, are stored in a static map, whereas the isolate is
    stored indirectly in a local variable of the main function. Since local
    variables get disposed before the static map is cleared, we have to
    clear the map before the end of the main function.
    
    R=kozyatinskiy@chromium.org
    
    Change-Id: Icb33184de254638b6cdfb899e940f18e6064cd69
    Reviewed-on: https://chromium-review.googlesource.com/774885Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49424}
    d9a91da6
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...