| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 void ConsoleBase::count(ScriptState* scriptState, PassRefPtrWillBeRawPtr<ScriptA
rguments> arguments) | 104 void ConsoleBase::count(ScriptState* scriptState, PassRefPtrWillBeRawPtr<ScriptA
rguments> arguments) |
| 105 { | 105 { |
| 106 InspectorInstrumentation::consoleCount(context(), scriptState, arguments); | 106 InspectorInstrumentation::consoleCount(context(), scriptState, arguments); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void ConsoleBase::markTimeline(const String& title) | 109 void ConsoleBase::markTimeline(const String& title) |
| 110 { | 110 { |
| 111 timeStamp(title); | 111 timeStamp(title); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void ConsoleBase::profile(ScriptState* scriptState, const String& title) | 114 void ConsoleBase::profile(const String& title) |
| 115 { | 115 { |
| 116 InspectorInstrumentation::consoleProfile(context(), title, scriptState); | 116 InspectorInstrumentation::consoleProfile(context(), title); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void ConsoleBase::profileEnd(ScriptState* scriptState, const String& title) | 119 void ConsoleBase::profileEnd(const String& title) |
| 120 { | 120 { |
| 121 InspectorInstrumentation::consoleProfileEnd(context(), title, scriptState); | 121 InspectorInstrumentation::consoleProfileEnd(context(), title); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void ConsoleBase::time(const String& title) | 124 void ConsoleBase::time(const String& title) |
| 125 { | 125 { |
| 126 InspectorInstrumentation::consoleTime(context(), title); | 126 InspectorInstrumentation::consoleTime(context(), title); |
| 127 TRACE_EVENT_COPY_ASYNC_BEGIN0("blink.console", title.utf8().data(), this); | 127 TRACE_EVENT_COPY_ASYNC_BEGIN0("blink.console", title.utf8().data(), this); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void ConsoleBase::timeEnd(ScriptState* scriptState, const String& title) | 130 void ConsoleBase::timeEnd(ScriptState* scriptState, const String& title) |
| 131 { | 131 { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 if (!context()) | 170 if (!context()) |
| 171 return; | 171 return; |
| 172 | 172 |
| 173 RefPtrWillBeRawPtr<ScriptArguments> arguments = scriptArguments; | 173 RefPtrWillBeRawPtr<ScriptArguments> arguments = scriptArguments; |
| 174 if (!acceptNoArguments && !arguments->argumentCount()) | 174 if (!acceptNoArguments && !arguments->argumentCount()) |
| 175 return; | 175 return; |
| 176 | 176 |
| 177 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; | 177 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; |
| 178 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol
e(scriptState, stackSize)); | 178 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol
e(stackSize)); |
| 179 | 179 |
| 180 String message; | 180 String message; |
| 181 bool gotStringMessage = arguments->getFirstArgumentAsString(message); | 181 bool gotStringMessage = arguments->getFirstArgumentAsString(message); |
| 182 InspectorInstrumentation::addConsoleAPIMessageToConsole(context(), type, lev
el, message, scriptState, arguments); | 182 InspectorInstrumentation::addConsoleAPIMessageToConsole(context(), type, lev
el, message, scriptState, arguments); |
| 183 if (gotStringMessage) | 183 if (gotStringMessage) |
| 184 reportMessageToClient(level, message, callStack); | 184 reportMessageToClient(level, message, callStack); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace blink | 187 } // namespace blink |
| OLD | NEW |