File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Top Open diff view settings Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Top Open diff view settings Original file line number Diff line number Diff line change @@ -398,10 +398,10 @@ static struct {
398398 }
399399
400400 void Dispose () {
401+ tracing_agent_.reset (nullptr );
401402 platform_->Shutdown ();
402403 delete platform_;
403404 platform_ = nullptr ;
404- tracing_agent_.reset (nullptr );
405405 }
406406
407407 void DrainVMTasks (Isolate* isolate) {
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ Agent::Agent() {
5959 Agent* agent = ContainerOf (&Agent::initialize_writer_async_, async);
6060 agent->InitializeWritersOnThread ();
6161 }), 0 );
62+ uv_unref (reinterpret_cast <uv_handle_t *>(&initialize_writer_async_));
6263}
6364
6465void Agent::InitializeWritersOnThread () {
@@ -72,6 +73,11 @@ void Agent::InitializeWritersOnThread() {
7273}
7374
7475Agent::~Agent () {
76+ categories_.clear ();
77+ writers_.clear ();
78+
79+ StopTracing ();
80+
7581 uv_close (reinterpret_cast <uv_handle_t *>(&initialize_writer_async_), nullptr );
7682 uv_run (&tracing_loop_, UV_RUN_ONCE);
7783 CheckedUvLoopClose (&tracing_loop_);
You can’t perform that action at this time.
0 commit comments