OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo
urce, StartGroupMessageType, LogMessageLevel, String(), scriptState, arguments); | 152 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo
urce, StartGroupMessageType, LogMessageLevel, String(), scriptState, arguments); |
153 } | 153 } |
154 | 154 |
155 void ConsoleBase::groupCollapsed(ScriptState* scriptState, PassRefPtrWillBeRawPt
r<ScriptArguments> arguments) | 155 void ConsoleBase::groupCollapsed(ScriptState* scriptState, PassRefPtrWillBeRawPt
r<ScriptArguments> arguments) |
156 { | 156 { |
157 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo
urce, StartGroupCollapsedMessageType, LogMessageLevel, String(), scriptState, ar
guments); | 157 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo
urce, StartGroupCollapsedMessageType, LogMessageLevel, String(), scriptState, ar
guments); |
158 } | 158 } |
159 | 159 |
160 void ConsoleBase::groupEnd() | 160 void ConsoleBase::groupEnd() |
161 { | 161 { |
162 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo
urce, EndGroupMessageType, LogMessageLevel, String(), nullptr); | 162 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo
urce, EndGroupMessageType, LogMessageLevel, String(), nullptr, nullptr); |
163 } | 163 } |
164 | 164 |
165 void ConsoleBase::internalAddMessage(MessageType type, MessageLevel level, Scrip
tState* scriptState, PassRefPtrWillBeRawPtr<ScriptArguments> scriptArguments, bo
ol acceptNoArguments, bool printTrace) | 165 void ConsoleBase::internalAddMessage(MessageType type, MessageLevel level, Scrip
tState* scriptState, PassRefPtrWillBeRawPtr<ScriptArguments> scriptArguments, bo
ol acceptNoArguments, bool printTrace) |
166 { | 166 { |
167 if (!context()) | 167 if (!context()) |
168 return; | 168 return; |
169 | 169 |
170 RefPtrWillBeRawPtr<ScriptArguments> arguments = scriptArguments; | 170 RefPtrWillBeRawPtr<ScriptArguments> arguments = scriptArguments; |
171 if (!acceptNoArguments && !arguments->argumentCount()) | 171 if (!acceptNoArguments && !arguments->argumentCount()) |
172 return; | 172 return; |
173 | 173 |
174 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; | 174 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; |
175 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol
e(scriptState, stackSize)); | 175 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol
e(scriptState, stackSize)); |
176 | 176 |
177 String message; | 177 String message; |
178 bool gotStringMessage = arguments->getFirstArgumentAsString(message); | 178 bool gotStringMessage = arguments->getFirstArgumentAsString(message); |
179 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo
urce, type, level, message, scriptState, arguments); | 179 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo
urce, type, level, message, scriptState, arguments); |
180 if (gotStringMessage) | 180 if (gotStringMessage) |
181 reportMessageToClient(level, message, callStack); | 181 reportMessageToClient(level, message, callStack); |
182 } | 182 } |
183 | 183 |
184 } // namespace WebCore | 184 } // namespace WebCore |
OLD | NEW |