Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Unified Diff: test/inspector/inspector-test.cc

Issue 2428213002: [inspector] finish test runner gracefully.. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/inspector/debugger/stepping-with-blackboxed-ranges.js ('k') | test/inspector/task-runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/inspector-test.cc
diff --git a/test/inspector/inspector-test.cc b/test/inspector/inspector-test.cc
index 0c217ed78033888969092a5bfc3246ebdecad805..54cdd7f4099681c47613a2ee1148f8324cb17450 100644
--- a/test/inspector/inspector-test.cc
+++ b/test/inspector/inspector-test.cc
@@ -21,10 +21,21 @@
namespace {
+std::vector<TaskRunner*> task_runners;
+
+void Terminate() {
+ for (size_t i = 0; i < task_runners.size(); ++i) {
+ task_runners[i]->Terminate();
+ task_runners[i]->Join();
+ }
+ std::vector<TaskRunner*> empty;
+ task_runners.swap(empty);
+}
+
void Exit() {
fflush(stdout);
fflush(stderr);
- _exit(0);
+ Terminate();
}
class UtilsExtension : public v8::Extension {
@@ -282,6 +293,9 @@ int main(int argc, char* argv[]) {
&ready_semaphore);
ready_semaphore.Wait();
+ task_runners.push_back(&frontend_runner);
+ task_runners.push_back(&backend_runner);
+
for (int i = 1; i < argc; ++i) {
if (argv[i][0] == '-') break;
@@ -297,5 +311,6 @@ int main(int argc, char* argv[]) {
}
frontend_runner.Join();
+ backend_runner.Join();
return 0;
}
« no previous file with comments | « test/inspector/debugger/stepping-with-blackboxed-ranges.js ('k') | test/inspector/task-runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698