Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1109)

Unified Diff: Source/core/inspector/InspectorTimelineAgent.cpp

Issue 323043002: Oilpan: Prepare moving InspectorAgent related classes to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorTimelineAgent.cpp
diff --git a/Source/core/inspector/InspectorTimelineAgent.cpp b/Source/core/inspector/InspectorTimelineAgent.cpp
index 7aebb0c555f9d5849e086e1ed8c3404f5dda0f35..e0ca8d69b334f9280ce3eec82b1b30022b9ed41b 100644
--- a/Source/core/inspector/InspectorTimelineAgent.cpp
+++ b/Source/core/inspector/InspectorTimelineAgent.cpp
@@ -158,6 +158,7 @@ struct TimelineRecordEntry {
};
class TimelineRecordStack {
+ DISALLOW_ALLOCATION();
private:
struct Entry {
Entry(PassRefPtr<TimelineEvent> record, const String& type)
@@ -177,8 +178,8 @@ private:
};
public:
- TimelineRecordStack() : m_timelineAgent(0) { }
- TimelineRecordStack(InspectorTimelineAgent*);
+ TimelineRecordStack() : m_timelineAgent(nullptr) { }
+ explicit TimelineRecordStack(InspectorTimelineAgent*);
void addScopedRecord(PassRefPtr<TimelineEvent> record, const String& type);
void closeScopedRecord(double endTime);
@@ -188,14 +189,18 @@ public:
bool isOpenRecordOfType(const String& type);
#endif
+ void trace(Visitor*);
+
private:
void send(PassRefPtr<JSONObject>);
- InspectorTimelineAgent* m_timelineAgent;
+ RawPtrWillBeMember<InspectorTimelineAgent> m_timelineAgent;
Vector<Entry> m_stack;
};
struct TimelineThreadState {
+ ALLOW_ONLY_INLINE_ALLOCATION();
+public:
TimelineThreadState() { }
TimelineThreadState(InspectorTimelineAgent* timelineAgent)
@@ -205,6 +210,8 @@ struct TimelineThreadState {
{
}
+ void trace(Visitor*);
+
TimelineRecordStack recordStack;
bool inKnownLayerTask;
unsigned long long decodedPixelRefId;
@@ -265,6 +272,7 @@ void InspectorTimelineAgent::trace(Visitor* visitor)
{
visitor->trace(m_pageAgent);
visitor->trace(m_layerTreeAgent);
+ visitor->trace(m_threadStates);
InspectorBaseAgent::trace(visitor);
}
@@ -1315,5 +1323,15 @@ bool TimelineRecordStack::isOpenRecordOfType(const String& type)
}
#endif
+void TimelineRecordStack::trace(Visitor* visitor)
+{
+ visitor->trace(m_timelineAgent);
+}
+
+void TimelineThreadState::trace(Visitor* visitor)
+{
+ visitor->trace(recordStack);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698