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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp

Issue 1924173002: [DevTools] Improve performance of InstrumentingAgents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile Created 4 years, 8 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: third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
index 5e2c53b04c0afcd7d7321210e9efe23985536b10..795bb92d26676eb43c517b35e345b72bc8c4eb63 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
@@ -900,7 +900,7 @@ void InspectorResourceAgent::enable(int totalBufferSize, int resourceBufferSize)
m_state->setBoolean(ResourceAgentState::resourceAgentEnabled, true);
m_state->setNumber(ResourceAgentState::totalBufferSize, totalBufferSize);
m_state->setNumber(ResourceAgentState::resourceBufferSize, resourceBufferSize);
- m_instrumentingAgents->setInspectorResourceAgent(this);
+ m_instrumentingAgents->addInspectorResourceAgent(this);
}
void InspectorResourceAgent::disable(ErrorString*)
@@ -908,7 +908,7 @@ void InspectorResourceAgent::disable(ErrorString*)
ASSERT(!m_pendingRequest);
m_state->setBoolean(ResourceAgentState::resourceAgentEnabled, false);
m_state->setString(ResourceAgentState::userAgentOverride, "");
- m_instrumentingAgents->setInspectorResourceAgent(0);
+ m_instrumentingAgents->removeInspectorResourceAgent(this);
m_resourcesData->clear();
m_knownRequestIdMap.clear();
}

Powered by Google App Engine
This is Rietveld 408576698