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

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

Issue 323043002: Oilpan: Prepare moving InspectorAgent related classes to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/inspector/InspectorHeapProfilerAgent.h ('k') | Source/core/inspector/InspectorInspectorAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorHeapProfilerAgent.cpp
diff --git a/Source/core/inspector/InspectorHeapProfilerAgent.cpp b/Source/core/inspector/InspectorHeapProfilerAgent.cpp
index 80db8daed450ed0aeb72bdfb8743a76c83e36541..056176d50bdbdff866dd203cbe98c6af67253892 100644
--- a/Source/core/inspector/InspectorHeapProfilerAgent.cpp
+++ b/Source/core/inspector/InspectorHeapProfilerAgent.cpp
@@ -48,15 +48,16 @@ static const char heapObjectsTrackingEnabled[] = "heapObjectsTrackingEnabled";
static const char allocationTrackingEnabled[] = "allocationTrackingEnabled";
}
-class InspectorHeapProfilerAgent::HeapStatsUpdateTask {
+class InspectorHeapProfilerAgent::HeapStatsUpdateTask FINAL : public NoBaseWillBeGarbageCollectedFinalized<InspectorHeapProfilerAgent::HeapStatsUpdateTask> {
public:
- HeapStatsUpdateTask(InspectorHeapProfilerAgent*);
+ explicit HeapStatsUpdateTask(InspectorHeapProfilerAgent*);
void startTimer();
void resetTimer() { m_timer.stop(); }
void onTimer(Timer<HeapStatsUpdateTask>*);
+ void trace(Visitor*);
private:
- InspectorHeapProfilerAgent* m_heapProfilerAgent;
+ RawPtrWillBeMember<InspectorHeapProfilerAgent> m_heapProfilerAgent;
Timer<HeapStatsUpdateTask> m_timer;
};
@@ -126,6 +127,11 @@ void InspectorHeapProfilerAgent::HeapStatsUpdateTask::startTimer()
m_timer.startRepeating(0.05, FROM_HERE);
}
+void InspectorHeapProfilerAgent::HeapStatsUpdateTask::trace(Visitor* visitor)
+{
+ visitor->trace(m_heapProfilerAgent);
+}
+
class InspectorHeapProfilerAgent::HeapStatsStream FINAL : public ScriptProfiler::OutputStream {
public:
HeapStatsStream(InspectorHeapProfilerAgent* heapProfilerAgent)
@@ -186,7 +192,7 @@ void InspectorHeapProfilerAgent::startTrackingHeapObjectsInternal(bool trackAllo
if (m_heapStatsUpdateTask)
return;
ScriptProfiler::startTrackingHeapObjects(trackAllocations);
- m_heapStatsUpdateTask = adoptPtr(new HeapStatsUpdateTask(this));
+ m_heapStatsUpdateTask = adoptPtrWillBeNoop(new HeapStatsUpdateTask(this));
m_heapStatsUpdateTask->startTimer();
}
@@ -312,5 +318,12 @@ void InspectorHeapProfilerAgent::getHeapObjectId(ErrorString* errorString, const
*heapSnapshotObjectId = String::number(id);
}
+void InspectorHeapProfilerAgent::trace(Visitor* visitor)
+{
+ visitor->trace(m_injectedScriptManager);
+ visitor->trace(m_heapStatsUpdateTask);
+ InspectorBaseAgent::trace(visitor);
+}
+
} // namespace blink
« no previous file with comments | « Source/core/inspector/InspectorHeapProfilerAgent.h ('k') | Source/core/inspector/InspectorInspectorAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698