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

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

Issue 12324011: Merge 142594 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « LayoutTests/http/tests/inspector-enabled/console-exception-while-no-inspector-expected.txt ('k') | 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp e type, MessageLevel level, const String& message, const String& scriptId, unsig ned lineNumber, ScriptState* state, unsigned long requestIdentifier) 181 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp e type, MessageLevel level, const String& message, const String& scriptId, unsig ned lineNumber, ScriptState* state, unsigned long requestIdentifier)
182 { 182 {
183 if (!developerExtrasEnabled()) 183 if (!developerExtrasEnabled())
184 return; 184 return;
185 185
186 if (type == ClearMessageType) { 186 if (type == ClearMessageType) {
187 ErrorString error; 187 ErrorString error;
188 clearMessages(&error); 188 clearMessages(&error);
189 } 189 }
190 190
191 addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type , level, message, scriptId, lineNumber, state, requestIdentifier))); 191 bool canGenerateCallStack = !isWorkerAgent() && m_frontend;
192 addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptId, lineNumber, state, requestIdentifier)));
192 } 193 }
193 194
194 Vector<unsigned> InspectorConsoleAgent::consoleMessageArgumentCounts() 195 Vector<unsigned> InspectorConsoleAgent::consoleMessageArgumentCounts()
195 { 196 {
196 Vector<unsigned> result(m_consoleMessages.size()); 197 Vector<unsigned> result(m_consoleMessages.size());
197 for (size_t i = 0; i < m_consoleMessages.size(); i++) 198 for (size_t i = 0; i < m_consoleMessages.size(); i++)
198 result[i] = m_consoleMessages[i]->argumentCount(); 199 result[i] = m_consoleMessages[i]->argumentCount();
199 return result; 200 return result;
200 } 201 }
201 202
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 }; 347 };
347 348
348 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe apObjectId) 349 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe apObjectId)
349 { 350 {
350 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n ew InspectableHeapObject(inspectedHeapObjectId))); 351 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n ew InspectableHeapObject(inspectedHeapObjectId)));
351 } 352 }
352 353
353 } // namespace WebCore 354 } // namespace WebCore
354 355
355 #endif // ENABLE(INSPECTOR) 356 #endif // ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector-enabled/console-exception-while-no-inspector-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698