| 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 13 matching lines...) Expand all Loading... |
| 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "sky/engine/config.h" | 29 #include "sky/engine/config.h" |
| 30 #include "sky/engine/core/frame/Console.h" | 30 #include "sky/engine/core/frame/Console.h" |
| 31 | 31 |
| 32 #include "sky/engine/bindings/core/v8/ScriptCallStackFactory.h" | 32 #include "sky/engine/bindings/core/v8/ScriptCallStackFactory.h" |
| 33 #include "sky/engine/core/inspector/ConsoleMessage.h" | 33 #include "sky/engine/core/inspector/ConsoleMessage.h" |
| 34 #include "sky/engine/core/inspector/InspectorTraceEvents.h" | |
| 35 #include "sky/engine/core/inspector/ScriptArguments.h" | 34 #include "sky/engine/core/inspector/ScriptArguments.h" |
| 36 #include "sky/engine/platform/TraceEvent.h" | 35 #include "sky/engine/platform/TraceEvent.h" |
| 37 #include "sky/engine/wtf/text/CString.h" | 36 #include "sky/engine/wtf/text/CString.h" |
| 38 #include "sky/engine/wtf/text/WTFString.h" | 37 #include "sky/engine/wtf/text/WTFString.h" |
| 39 | 38 |
| 40 namespace blink { | 39 namespace blink { |
| 41 | 40 |
| 42 ConsoleBase::~ConsoleBase() | 41 ConsoleBase::~ConsoleBase() |
| 43 { | 42 { |
| 44 } | 43 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 String message = title + String::format(": %.3fms", elapsed * 1000); | 163 String message = title + String::format(": %.3fms", elapsed * 1000); |
| 165 | 164 |
| 166 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(ConsoleAPIMes
sageSource, DebugMessageLevel, message); | 165 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(ConsoleAPIMes
sageSource, DebugMessageLevel, message); |
| 167 consoleMessage->setType(TimeEndMessageType); | 166 consoleMessage->setType(TimeEndMessageType); |
| 168 consoleMessage->setScriptState(scriptState); | 167 consoleMessage->setScriptState(scriptState); |
| 169 reportMessageToConsole(consoleMessage.release()); | 168 reportMessageToConsole(consoleMessage.release()); |
| 170 } | 169 } |
| 171 | 170 |
| 172 void ConsoleBase::timeStamp(const String& title) | 171 void ConsoleBase::timeStamp(const String& title) |
| 173 { | 172 { |
| 174 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "TimeSt
amp", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorTimeStampEvent::data(context()
, title)); | |
| 175 } | 173 } |
| 176 | 174 |
| 177 void ConsoleBase::timeline(ScriptState* scriptState, const String& title) | 175 void ConsoleBase::timeline(ScriptState* scriptState, const String& title) |
| 178 { | 176 { |
| 179 } | 177 } |
| 180 | 178 |
| 181 void ConsoleBase::timelineEnd(ScriptState* scriptState, const String& title) | 179 void ConsoleBase::timelineEnd(ScriptState* scriptState, const String& title) |
| 182 { | 180 { |
| 183 } | 181 } |
| 184 | 182 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 212 consoleMessage->setScriptArguments(arguments); | 210 consoleMessage->setScriptArguments(arguments); |
| 213 | 211 |
| 214 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; | 212 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture :
1; |
| 215 RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(stackSize)
); | 213 RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(stackSize)
); |
| 216 consoleMessage->setCallStack(callStack); | 214 consoleMessage->setCallStack(callStack); |
| 217 | 215 |
| 218 reportMessageToConsole(consoleMessage.release()); | 216 reportMessageToConsole(consoleMessage.release()); |
| 219 } | 217 } |
| 220 | 218 |
| 221 } // namespace blink | 219 } // namespace blink |
| OLD | NEW |