Index: Source/core/inspector/InspectorConsoleAgent.cpp |
diff --git a/Source/core/inspector/InspectorConsoleAgent.cpp b/Source/core/inspector/InspectorConsoleAgent.cpp |
index 2cb5495283ccdb69307be2cebf9ca4642486450e..1aa15470f2db8f4316f824f1dbfaff5e5f718937 100644 |
--- a/Source/core/inspector/InspectorConsoleAgent.cpp |
+++ b/Source/core/inspector/InspectorConsoleAgent.cpp |
@@ -243,18 +243,8 @@ void InspectorConsoleAgent::consoleCount(ScriptState* state, PassRefPtr<ScriptAr |
String identifier = title.isEmpty() ? String(lastCaller.sourceURL() + ':' + String::number(lastCaller.lineNumber())) |
: String(title + '@'); |
- HashMap<String, unsigned>::iterator it = m_counts.find(identifier); |
- int count; |
- if (it == m_counts.end()) |
- count = 1; |
- else { |
- count = it->value + 1; |
- m_counts.remove(it); |
- } |
- |
- m_counts.add(identifier, count); |
- |
- String message = title + ": " + String::number(count); |
+ HashCountedSet<String>::AddResult result = m_counts.add(identifier); |
+ String message = title + ": " + String::number(result.iterator->value); |
addMessageToConsole(ConsoleAPIMessageSource, LogMessageType, DebugMessageLevel, message, callStack); |
} |