Index: third_party/WebKit/Source/platform/TraceEvent.h |
diff --git a/third_party/WebKit/Source/platform/TraceEvent.h b/third_party/WebKit/Source/platform/TraceEvent.h |
index b2d51c05913d706cfeadaa873c662fbde7eee251..4770247b878a9181efea0ed8ef8dd8ace3c1825c 100644 |
--- a/third_party/WebKit/Source/platform/TraceEvent.h |
+++ b/third_party/WebKit/Source/platform/TraceEvent.h |
@@ -291,11 +291,12 @@ const unsigned long long noBindId = 0; |
// with the Process ID so that they are unlikely to collide when the same |
// pointer is used on different processes. |
class TraceID final { |
- STACK_ALLOCATED(); |
+ DISALLOW_NEW(); |
WTF_MAKE_NONCOPYABLE(TraceID); |
public: |
class WithScope final { |
- STACK_ALLOCATED(); |
+ DISALLOW_NEW(); |
+ |
public: |
template<typename T> WithScope(const char* scope, T id) |
: m_scope(scope), m_data(reinterpret_cast<unsigned long long>(id)) { } |
@@ -307,7 +308,8 @@ public: |
}; |
template<bool dummyMangle> class MangleBehavior final { |
- STACK_ALLOCATED(); |
+ DISALLOW_NEW(); |
+ |
public: |
template<typename T> explicit MangleBehavior(T id) : m_data(reinterpret_cast<unsigned long long>(id)) { } |
explicit MangleBehavior(WithScope scopedID) : m_scope(scopedID.scope()), m_data(scopedID.data()) { } |
@@ -369,7 +371,8 @@ union TraceValueUnion { |
// Simple container for const char* that should be copied instead of retained. |
class TraceStringWithCopy { |
- STACK_ALLOCATED(); |
+ DISALLOW_NEW(); |
+ |
public: |
explicit TraceStringWithCopy(const char* str) : m_str(str) { } |
const char* str() const { return m_str; } |
@@ -594,7 +597,7 @@ static inline TraceEventHandle addTraceEvent( |
// Used by TRACE_EVENTx macro. Do not use directly. |
class ScopedTracer final { |
- STACK_ALLOCATED(); |
+ DISALLOW_NEW(); |
WTF_MAKE_NONCOPYABLE(ScopedTracer); |
public: |
// Note: members of m_data intentionally left uninitialized. See initialize. |
@@ -634,7 +637,7 @@ private: |
// the sampling state having recorded. |
template<size_t BucketNumber> |
class SamplingStateScope final { |
- STACK_ALLOCATED(); |
+ DISALLOW_NEW(); |
WTF_MAKE_NONCOPYABLE(SamplingStateScope); |
public: |
SamplingStateScope(const char* categoryAndName) |
@@ -663,7 +666,7 @@ private: |
}; |
template<typename IDType> class TraceScopedTrackableObject { |
- STACK_ALLOCATED(); |
+ DISALLOW_NEW(); |
WTF_MAKE_NONCOPYABLE(TraceScopedTrackableObject); |
public: |
TraceScopedTrackableObject(const char* categoryGroup, const char* name, IDType id) |
@@ -672,6 +675,12 @@ public: |
TRACE_EVENT_OBJECT_CREATED_WITH_ID(m_categoryGroup, m_name, m_id); |
} |
+ template <typename ArgType> |
+ void snapshot(ArgType snapshot) const |
+ { |
+ TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(m_categoryGroup, m_name, m_id, snapshot); |
+ } |
+ |
~TraceScopedTrackableObject() |
{ |
TRACE_EVENT_OBJECT_DELETED_WITH_ID(m_categoryGroup, m_name, m_id); |