| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 , m_scriptState(scriptState) | 68 , m_scriptState(scriptState) |
| 69 , m_url(url) | 69 , m_url(url) |
| 70 , m_line(line) | 70 , m_line(line) |
| 71 , m_column(column) | 71 , m_column(column) |
| 72 , m_requestId(IdentifiersFactory::requestId(requestIdentifier)) | 72 , m_requestId(IdentifiersFactory::requestId(requestIdentifier)) |
| 73 , m_timestamp(WTF::currentTime()) | 73 , m_timestamp(WTF::currentTime()) |
| 74 { | 74 { |
| 75 autogenerateMetadata(canGenerateCallStack, scriptState); | 75 autogenerateMetadata(canGenerateCallStack, scriptState); |
| 76 } | 76 } |
| 77 | 77 |
| 78 InspectorConsoleMessage::InspectorConsoleMessage(bool, MessageSource source, Mes
sageType type, MessageLevel level, const String& message, PassRefPtrWillBeRawPtr
<ScriptCallStack> callStack, unsigned long requestIdentifier) | 78 InspectorConsoleMessage::InspectorConsoleMessage(MessageSource source, MessageTy
pe type, MessageLevel level, const String& message, PassRefPtrWillBeRawPtr<Scrip
tCallStack> callStack, unsigned long requestIdentifier) |
| 79 : m_source(source) | 79 : m_source(source) |
| 80 , m_type(type) | 80 , m_type(type) |
| 81 , m_level(level) | 81 , m_level(level) |
| 82 , m_message(message) | 82 , m_message(message) |
| 83 , m_scriptState(0) | 83 , m_scriptState(0) |
| 84 , m_arguments(nullptr) | 84 , m_arguments(nullptr) |
| 85 , m_line(0) | 85 , m_line(0) |
| 86 , m_column(0) | 86 , m_column(0) |
| 87 , m_requestId(IdentifiersFactory::requestId(requestIdentifier)) | 87 , m_requestId(IdentifiersFactory::requestId(requestIdentifier)) |
| 88 , m_timestamp(WTF::currentTime()) | 88 , m_timestamp(WTF::currentTime()) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 115 InspectorConsoleMessage::~InspectorConsoleMessage() | 115 InspectorConsoleMessage::~InspectorConsoleMessage() |
| 116 { | 116 { |
| 117 } | 117 } |
| 118 | 118 |
| 119 void InspectorConsoleMessage::autogenerateMetadata(bool canGenerateCallStack, Sc
riptState* scriptState) | 119 void InspectorConsoleMessage::autogenerateMetadata(bool canGenerateCallStack, Sc
riptState* scriptState) |
| 120 { | 120 { |
| 121 if (m_type == EndGroupMessageType) | 121 if (m_type == EndGroupMessageType) |
| 122 return; | 122 return; |
| 123 | 123 |
| 124 if (scriptState) | 124 if (scriptState) |
| 125 m_callStack = createScriptCallStackForConsole(scriptState); | 125 m_callStack = createScriptCallStackForConsole(); |
| 126 else if (canGenerateCallStack) | 126 else if (canGenerateCallStack) |
| 127 m_callStack = createScriptCallStack(ScriptCallStack::maxCallStackSizeToC
apture, true); | 127 m_callStack = createScriptCallStack(ScriptCallStack::maxCallStackSizeToC
apture, true); |
| 128 else | 128 else |
| 129 return; | 129 return; |
| 130 | 130 |
| 131 if (m_callStack && m_callStack->size()) { | 131 if (m_callStack && m_callStack->size()) { |
| 132 const ScriptCallFrame& frame = m_callStack->at(0); | 132 const ScriptCallFrame& frame = m_callStack->at(0); |
| 133 m_url = frame.sourceURL(); | 133 m_url = frame.sourceURL(); |
| 134 m_line = frame.lineNumber(); | 134 m_line = frame.lineNumber(); |
| 135 m_column = frame.columnNumber(); | 135 m_column = frame.columnNumber(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 } | 254 } |
| 255 | 255 |
| 256 unsigned InspectorConsoleMessage::argumentCount() | 256 unsigned InspectorConsoleMessage::argumentCount() |
| 257 { | 257 { |
| 258 if (m_arguments) | 258 if (m_arguments) |
| 259 return m_arguments->argumentCount(); | 259 return m_arguments->argumentCount(); |
| 260 return 0; | 260 return 0; |
| 261 } | 261 } |
| 262 | 262 |
| 263 } // namespace blink | 263 } // namespace blink |
| OLD | NEW |