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

Side by Side Diff: Source/core/inspector/InspectorConsoleAgent.cpp

Issue 414013002: DevTools: nits: collect only top call frame in InspectorConsoleAgent::consoleCount. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 m_timelineAgent->consoleTimeline(context, title, scriptState); 227 m_timelineAgent->consoleTimeline(context, title, scriptState);
228 } 228 }
229 229
230 void InspectorConsoleAgent::consoleTimelineEnd(ExecutionContext* context, const String& title, ScriptState* scriptState) 230 void InspectorConsoleAgent::consoleTimelineEnd(ExecutionContext* context, const String& title, ScriptState* scriptState)
231 { 231 {
232 m_timelineAgent->consoleTimelineEnd(context, title, scriptState); 232 m_timelineAgent->consoleTimelineEnd(context, title, scriptState);
233 } 233 }
234 234
235 void InspectorConsoleAgent::consoleCount(ScriptState* scriptState, PassRefPtrWil lBeRawPtr<ScriptArguments> arguments) 235 void InspectorConsoleAgent::consoleCount(ScriptState* scriptState, PassRefPtrWil lBeRawPtr<ScriptArguments> arguments)
236 { 236 {
237 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol e(scriptState)); 237 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol e(scriptState, 1));
238 const ScriptCallFrame& lastCaller = callStack->at(0); 238 const ScriptCallFrame& lastCaller = callStack->at(0);
239 // Follow Firebug's behavior of counting with null and undefined title in 239 // Follow Firebug's behavior of counting with null and undefined title in
240 // the same bucket as no argument 240 // the same bucket as no argument
241 String title; 241 String title;
242 arguments->getFirstArgumentAsString(title); 242 arguments->getFirstArgumentAsString(title);
243 String identifier = title.isEmpty() ? String(lastCaller.sourceURL() + ':' + String::number(lastCaller.lineNumber())) 243 String identifier = title.isEmpty() ? String(lastCaller.sourceURL() + ':' + String::number(lastCaller.lineNumber()))
244 : String(title + '@'); 244 : String(title + '@');
245 245
246 HashCountedSet<String>::AddResult result = m_counts.add(identifier); 246 HashCountedSet<String>::AddResult result = m_counts.add(identifier);
247 String message = title + ": " + String::number(result.storedValue->value); 247 String message = title + ": " + String::number(result.storedValue->value);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 int m_heapObjectId; 325 int m_heapObjectId;
326 }; 326 };
327 327
328 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe apObjectId) 328 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe apObjectId)
329 { 329 {
330 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n ew InspectableHeapObject(inspectedHeapObjectId))); 330 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n ew InspectableHeapObject(inspectedHeapObjectId)));
331 } 331 }
332 332
333 } // namespace blink 333 } // namespace blink
334 334
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698