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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 void ConsoleBase::internalAddMessage(MessageType type, MessageLevel level, Scrip
tState* scriptState, PassRefPtrWillBeRawPtr<ScriptArguments> scriptArguments, bo
ol acceptNoArguments, bool printTrace) | 168 void ConsoleBase::internalAddMessage(MessageType type, MessageLevel level, Scrip
tState* scriptState, PassRefPtrWillBeRawPtr<ScriptArguments> scriptArguments, bo
ol acceptNoArguments, bool printTrace) |
169 { | 169 { |
170 RefPtrWillBeRawPtr<ScriptArguments> arguments = scriptArguments; | 170 RefPtrWillBeRawPtr<ScriptArguments> arguments = scriptArguments; |
171 if (!acceptNoArguments && (!arguments || !arguments->argumentCount())) | 171 if (!acceptNoArguments && (!arguments || !arguments->argumentCount())) |
172 return; | 172 return; |
173 | 173 |
174 String message; | 174 String message; |
175 bool gotStringMessage = arguments ? arguments->getFirstArgumentAsString(mess
age) : false; | 175 bool gotStringMessage = arguments ? arguments->getFirstArgumentAsString(mess
age) : false; |
176 | 176 |
177 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(ConsoleAPIMes
sageSource, level, gotStringMessage? message : String()); | 177 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(C
onsoleAPIMessageSource, level, gotStringMessage? message : String()); |
178 consoleMessage->setType(type); | 178 consoleMessage->setType(type); |
179 consoleMessage->setScriptState(scriptState); | 179 consoleMessage->setScriptState(scriptState); |
180 consoleMessage->setScriptArguments(arguments); | 180 consoleMessage->setScriptArguments(arguments); |
181 | 181 |
182 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; | 182 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; |
183 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol
e(stackSize)); | 183 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol
e(stackSize)); |
184 consoleMessage->setCallStack(callStack); | 184 consoleMessage->setCallStack(callStack); |
185 | 185 |
186 reportMessageToConsole(consoleMessage.release()); | 186 reportMessageToConsole(consoleMessage.release()); |
187 } | 187 } |
188 | 188 |
189 } // namespace blink | 189 } // namespace blink |
OLD | NEW |