-
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: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#49424}
d9a91da6