OLD | NEW |
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole()); | 240 RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole()); |
241 const ScriptCallFrame& lastCaller = callStack->at(0); | 241 const ScriptCallFrame& lastCaller = callStack->at(0); |
242 // Follow Firebug's behavior of counting with null and undefined title in | 242 // Follow Firebug's behavior of counting with null and undefined title in |
243 // the same bucket as no argument | 243 // the same bucket as no argument |
244 String title; | 244 String title; |
245 arguments->getFirstArgumentAsString(title); | 245 arguments->getFirstArgumentAsString(title); |
246 String identifier = title.isEmpty() ? String(lastCaller.sourceURL() + ':' +
String::number(lastCaller.lineNumber())) | 246 String identifier = title.isEmpty() ? String(lastCaller.sourceURL() + ':' +
String::number(lastCaller.lineNumber())) |
247 : String(title + '@'); | 247 : String(title + '@'); |
248 | 248 |
249 HashCountedSet<String>::AddResult result = m_counts.add(identifier); | 249 HashCountedSet<String>::AddResult result = m_counts.add(identifier); |
250 String message = title + ": " + String::number(result.iterator->value); | 250 String message = title + ": " + String::number(result.storedValue->value); |
251 addMessageToConsole(ConsoleAPIMessageSource, LogMessageType, DebugMessageLev
el, message, callStack); | 251 addMessageToConsole(ConsoleAPIMessageSource, LogMessageType, DebugMessageLev
el, message, callStack); |
252 } | 252 } |
253 | 253 |
254 void InspectorConsoleAgent::frameWindowDiscarded(DOMWindow* window) | 254 void InspectorConsoleAgent::frameWindowDiscarded(DOMWindow* window) |
255 { | 255 { |
256 size_t messageCount = m_consoleMessages.size(); | 256 size_t messageCount = m_consoleMessages.size(); |
257 for (size_t i = 0; i < messageCount; ++i) | 257 for (size_t i = 0; i < messageCount; ++i) |
258 m_consoleMessages[i]->windowCleared(window); | 258 m_consoleMessages[i]->windowCleared(window); |
259 m_injectedScriptManager->discardInjectedScriptsFor(window); | 259 m_injectedScriptManager->discardInjectedScriptsFor(window); |
260 } | 260 } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 int m_heapObjectId; | 341 int m_heapObjectId; |
342 }; | 342 }; |
343 | 343 |
344 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe
apObjectId) | 344 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe
apObjectId) |
345 { | 345 { |
346 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n
ew InspectableHeapObject(inspectedHeapObjectId))); | 346 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n
ew InspectableHeapObject(inspectedHeapObjectId))); |
347 } | 347 } |
348 | 348 |
349 } // namespace WebCore | 349 } // namespace WebCore |
350 | 350 |
OLD | NEW |