• 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
..
console Loading commit data...
cpu-profiler Loading commit data...
debugger Loading commit data...
heap-profiler Loading commit data...
runtime Loading commit data...
sessions Loading commit data...
type-profiler Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...
inspector-test.cc Loading commit data...
inspector.gyp Loading commit data...
inspector.isolate Loading commit data...
inspector.status Loading commit data...
isolate-data.cc Loading commit data...
isolate-data.h Loading commit data...
json-parse-expected.txt Loading commit data...
json-parse.js Loading commit data...
protocol-test.js Loading commit data...
task-runner.cc Loading commit data...
task-runner.h Loading commit data...
testcfg.py Loading commit data...