Index: Source/core/inspector/InspectorHeapProfilerAgent.cpp |
diff --git a/Source/core/inspector/InspectorHeapProfilerAgent.cpp b/Source/core/inspector/InspectorHeapProfilerAgent.cpp |
index 80db8daed450ed0aeb72bdfb8743a76c83e36541..d214c67e5e6d492633d9c214b4d80b86078b9411 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 : public NoBaseWillBeGarbageCollectedFinalized<InspectorHeapProfilerAgent::HeapStatsUpdateTask> { |
haraken
2014/07/25 01:38:44
Add FINAL.
keishi
2014/07/25 03:56:28
Done.
|
public: |
HeapStatsUpdateTask(InspectorHeapProfilerAgent*); |
haraken
2014/07/25 01:38:45
Add explicit.
keishi
2014/07/25 03:56:28
Done.
|
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 |