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

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

Issue 17030009: Inspector: wrapped inspector agent instances into factory-like wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Made InspectorBaseAgent RefCounted Created 7 years, 6 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/InspectorHeapProfilerAgent.cpp
diff --git a/Source/core/inspector/InspectorHeapProfilerAgent.cpp b/Source/core/inspector/InspectorHeapProfilerAgent.cpp
index 55d2acec20cec53af8eec5255872f0f09ea817cd..92e0298b3c39febfcbd369d41cc0388939ebb6ee 100644
--- a/Source/core/inspector/InspectorHeapProfilerAgent.cpp
+++ b/Source/core/inspector/InspectorHeapProfilerAgent.cpp
@@ -60,13 +60,13 @@ private:
Timer<HeapStatsUpdateTask> m_timer;
};
-PassOwnPtr<InspectorHeapProfilerAgent> InspectorHeapProfilerAgent::create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* inspectorState, InjectedScriptManager* injectedScriptManager)
+PassRefPtr<InspectorHeapProfilerAgent> InspectorHeapProfilerAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, InjectedScriptManager* injectedScriptManager)
{
- return adoptPtr(new InspectorHeapProfilerAgent(instrumentingAgents, inspectorState, injectedScriptManager));
+ return adoptRef(new InspectorHeapProfilerAgent(instrumentingAgents, inspectorState, injectedScriptManager));
}
-InspectorHeapProfilerAgent::InspectorHeapProfilerAgent(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* inspectorState, InjectedScriptManager* injectedScriptManager)
- : InspectorBaseAgent<InspectorHeapProfilerAgent>("HeapProfiler", instrumentingAgents, inspectorState)
+InspectorHeapProfilerAgent::InspectorHeapProfilerAgent(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, InjectedScriptManager* injectedScriptManager)
+ : InspectorBaseAgent(instrumentingAgents, inspectorState)
, m_injectedScriptManager(injectedScriptManager)
, m_frontend(0)
, m_nextUserInitiatedHeapSnapshotNumber(1)
@@ -318,7 +318,7 @@ void InspectorHeapProfilerAgent::getHeapObjectId(ErrorString* errorString, const
void InspectorHeapProfilerAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorProfilerAgent);
- InspectorBaseAgent<InspectorHeapProfilerAgent>::reportMemoryUsage(memoryObjectInfo);
+ InspectorBaseAgent::reportMemoryUsage(memoryObjectInfo);
info.addMember(m_injectedScriptManager, "injectedScriptManager");
info.addWeakPointer(m_frontend);
info.addMember(m_snapshots, "snapshots");

Powered by Google App Engine
This is Rietveld 408576698