diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/inspector/devtools_agent.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/inspector/devtools_agent.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/chromium/third_party/blink/renderer/core/inspector/devtools_agent.cc b/chromium/third_party/blink/renderer/core/inspector/devtools_agent.cc index ce60e4be4cc..0ce78ddf7b5 100644 --- a/chromium/third_party/blink/renderer/core/inspector/devtools_agent.cc +++ b/chromium/third_party/blink/renderer/core/inspector/devtools_agent.cc @@ -108,7 +108,7 @@ void DevToolsAgent::AttachDevToolsSession( mojom::blink::DevToolsSessionRequest io_session_request, mojom::blink::DevToolsSessionStatePtr reattach_session_state) { client_->DebuggerTaskStarted(); - DevToolsSession* session = new DevToolsSession( + DevToolsSession* session = MakeGarbageCollected<DevToolsSession>( this, std::move(host), std::move(session_request), std::move(io_session_request), std::move(reattach_session_state)); sessions_.insert(session); @@ -124,14 +124,17 @@ void DevToolsAgent::FlushProtocolNotifications() { session->FlushProtocolNotifications(); } -void DevToolsAgent::ReportChildWorkers(bool report, bool wait_for_debugger) { +void DevToolsAgent::ReportChildWorkers(bool report, + bool wait_for_debugger, + base::OnceClosure callback) { report_child_workers_ = report; pause_child_workers_on_start_ = wait_for_debugger; - if (!report_child_workers_) - return; - auto workers = std::move(unreported_child_worker_threads_); - for (auto& it : workers) - ReportChildWorker(std::move(it.value)); + if (report_child_workers_) { + auto workers = std::move(unreported_child_worker_threads_); + for (auto& it : workers) + ReportChildWorker(std::move(it.value)); + } + std::move(callback).Run(); } // static |