Index: Source/core/inspector/InspectorResourceAgent.cpp |
diff --git a/Source/core/inspector/InspectorResourceAgent.cpp b/Source/core/inspector/InspectorResourceAgent.cpp |
index ada11581b383a5e57bff530dc0d08b80fc02a03c..7017b4287cc3cbc6a489c16fb00aef33c43fcb56 100644 |
--- a/Source/core/inspector/InspectorResourceAgent.cpp |
+++ b/Source/core/inspector/InspectorResourceAgent.cpp |
@@ -723,8 +723,8 @@ void InspectorResourceAgent::didCommitLoad(Frame* frame, DocumentLoader* loader) |
void InspectorResourceAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
{ |
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorResourceAgent); |
- InspectorBaseAgent<InspectorResourceAgent>::reportMemoryUsage(memoryObjectInfo); |
- info.addWeakPointer(m_pageAgent); |
+ InspectorBaseAgent::reportMemoryUsage(memoryObjectInfo); |
+ info.addWeakPointer(m_pageAgent.get()); |
info.addWeakPointer(m_client); |
info.addWeakPointer(m_frontend); |
info.addMember(m_userAgentOverride, "userAgentOverride"); |
@@ -733,8 +733,13 @@ void InspectorResourceAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf |
info.addMember(m_styleRecalculationInitiator, "styleRecalculationInitiator"); |
} |
-InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorClient* client, InspectorCompositeState* state) |
- : InspectorBaseAgent<InspectorResourceAgent>("Network", instrumentingAgents, state) |
+PassRefPtr<InspectorResourceAgent> InspectorResourceAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, InspectorClient* client) |
+{ |
+ return adoptRef(new InspectorResourceAgent(instrumentingAgents, state, pageAgent, client)); |
+} |
+ |
+InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, InspectorClient* client) |
+ : InspectorBaseAgent(instrumentingAgents, state) |
, m_pageAgent(pageAgent) |
, m_client(client) |
, m_frontend(0) |
@@ -744,5 +749,11 @@ InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentin |
{ |
} |
+InspectorResourceFactory::InspectorResourceFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageFactory* pageFactory, InspectorClient* client) |
+ : InspectorBaseFactory<InspectorResourceFactory, InspectorResourceAgent>("Resource", instrumentingAgents, compositeState) |
+{ |
+ setAgent(InspectorResourceAgent::create(m_instrumentingAgents, m_state, pageFactory->agent(), client)); |
+} |
+ |
} // namespace WebCore |