| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; | 83 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; |
| 84 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize)); | 84 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize)); |
| 85 const ScriptCallFrame& lastCaller = callStack->at(0); | 85 const ScriptCallFrame& lastCaller = callStack->at(0); |
| 86 | 86 |
| 87 String message; | 87 String message; |
| 88 bool gotMessage = arguments->getFirstArgumentAsString(message); | 88 bool gotMessage = arguments->getFirstArgumentAsString(message); |
| 89 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource,
type, level, message, state, arguments); | 89 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource,
type, level, message, state, arguments); |
| 90 | 90 |
| 91 if (gotMessage) | 91 if (gotMessage) |
| 92 page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, t
ype, level, message, lastCaller.lineNumber(), lastCaller.sourceURL()); | 92 page->chrome().client()->addMessageToConsole(ConsoleAPIMessageSource, ty
pe, level, message, lastCaller.lineNumber(), lastCaller.sourceURL()); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments) | 95 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments) |
| 96 { | 96 { |
| 97 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen
ts); | 97 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen
ts); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments) | 100 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments) |
| 101 { | 101 { |
| 102 internalAddMessage(page(), LogMessageType, ErrorMessageLevel, state, argumen
ts); | 102 internalAddMessage(page(), LogMessageType, ErrorMessageLevel, state, argumen
ts); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 } | 241 } |
| 242 | 242 |
| 243 Page* Console::page() const | 243 Page* Console::page() const |
| 244 { | 244 { |
| 245 if (!m_frame) | 245 if (!m_frame) |
| 246 return 0; | 246 return 0; |
| 247 return m_frame->page(); | 247 return m_frame->page(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace WebCore | 250 } // namespace WebCore |
| OLD | NEW |