| Index: Source/core/workers/WorkerMessagingProxy.cpp
|
| diff --git a/Source/core/workers/WorkerMessagingProxy.cpp b/Source/core/workers/WorkerMessagingProxy.cpp
|
| index 081a68272cb06abb18d032731482785d41c54941..46d09cffd0fab2db4b6f4f50a8110a102e3255d4 100644
|
| --- a/Source/core/workers/WorkerMessagingProxy.cpp
|
| +++ b/Source/core/workers/WorkerMessagingProxy.cpp
|
| @@ -48,6 +48,7 @@
|
| #include "core/workers/WorkerObjectProxy.h"
|
| #include "core/workers/WorkerThreadStartupData.h"
|
| #include "platform/NotImplemented.h"
|
| +#include "platform/TraceEvent.h"
|
| #include "platform/heap/Handle.h"
|
| #include "wtf/Functional.h"
|
| #include "wtf/MainThread.h"
|
| @@ -253,6 +254,22 @@ void WorkerMessagingProxy::sendMessageToInspector(const String& message)
|
| m_workerThread->interruptAndDispatchInspectorCommands();
|
| }
|
|
|
| +static void dispatchWriteTimelineStartedEvent(ExecutionContext* context, const String& sessionId)
|
| +{
|
| + TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "TracingStartedInWorker", "sessionId", sessionId.utf8());
|
| +}
|
| +
|
| +void WorkerMessagingProxy::writeTimelineStartedEvent(const String& sessionId)
|
| +{
|
| + if (m_askedToTerminate)
|
| + return;
|
| + OwnPtr<ExecutionContextTask> task = createCrossThreadTask(dispatchWriteTimelineStartedEvent, String(sessionId));
|
| + if (m_workerThread)
|
| + m_workerThread->postTask(task.release());
|
| + else
|
| + m_queuedEarlyTasks.append(task.release());
|
| +}
|
| +
|
| void WorkerMessagingProxy::workerGlobalScopeDestroyed()
|
| {
|
| // This method is always the last to be performed, so the proxy is not needed for communication
|
|
|