From c45dfa0e8dcfda3fcd0f272a68b76f8013df0e87 Mon Sep 17 00:00:00 2001 From: James Robinson Date: Mon, 2 Feb 2015 16:56:34 -0800 Subject: [PATCH] De-client tracing.TraceController interface The tracing service logically provides one service, TraceCoordinator, which can start and stop tracing sessions. It also can connect to any number of TraceControllers each of which can supply tracing information on demand. Whenever an app connects to the tracing service, the tracing service attempts to connect to that app's TraceController interface. If the app provides this interface then tracing data will be requested whenever tracing starts. If the app doesn't, then the pipe just closes. Thus apps that want to be traced can do so by creating however many connections to the tracing service they want and registering a TraceController implementation on each outgoing connection. The shell connects in a similar fashion by connecting to the tracing service and providing a TraceController implementation. The code looks a bit different since the shell is special. BUG=451319 R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/791493006 --- engine/src/flutter/tools/debugger/trace_collector.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/tools/debugger/trace_collector.cc b/engine/src/flutter/tools/debugger/trace_collector.cc index 75345db46e..6232d7dab5 100644 --- a/engine/src/flutter/tools/debugger/trace_collector.cc +++ b/engine/src/flutter/tools/debugger/trace_collector.cc @@ -15,7 +15,8 @@ TraceCollector::~TraceCollector() { } void TraceCollector::GetTrace(TraceCallback callback) { - DCHECK(!callback_.is_null()); + DCHECK(callback_.is_null()); + DCHECK(!callback.is_null()); if (is_complete_) { callback.Run(GetTraceAsString()); return;