| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 static TypeBuilder::Console::ConsoleMessage::Level::Enum messageLevelValue(Messa
geLevel level) | 157 static TypeBuilder::Console::ConsoleMessage::Level::Enum messageLevelValue(Messa
geLevel level) |
| 158 { | 158 { |
| 159 switch (level) { | 159 switch (level) { |
| 160 case DebugMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::
Debug; | 160 case DebugMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::
Debug; |
| 161 case LogMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::Lo
g; | 161 case LogMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::Lo
g; |
| 162 case WarningMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level
::Warning; | 162 case WarningMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level
::Warning; |
| 163 case ErrorMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::
Error; | 163 case ErrorMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::
Error; |
| 164 case InfoMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::I
nfo; | 164 case InfoMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::I
nfo; |
| 165 case RevokedErrorMessageLevel: return TypeBuilder::Console::ConsoleMessage::
Level::RevokedError; |
| 165 } | 166 } |
| 166 return TypeBuilder::Console::ConsoleMessage::Level::Log; | 167 return TypeBuilder::Console::ConsoleMessage::Level::Log; |
| 167 } | 168 } |
| 168 | 169 |
| 169 void InspectorConsoleAgent::sendConsoleMessageToFrontend(ConsoleMessage* console
Message, bool generatePreview) | 170 void InspectorConsoleAgent::sendConsoleMessageToFrontend(ConsoleMessage* console
Message, bool generatePreview) |
| 170 { | 171 { |
| 171 if (consoleMessage->workerGlobalScopeProxy()) | 172 if (consoleMessage->workerGlobalScopeProxy()) |
| 172 return; | 173 return; |
| 173 | 174 |
| 174 RefPtr<TypeBuilder::Console::ConsoleMessage> jsonObj = TypeBuilder::Console:
:ConsoleMessage::create() | 175 RefPtr<TypeBuilder::Console::ConsoleMessage> jsonObj = TypeBuilder::Console:
:ConsoleMessage::create() |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 } | 215 } |
| 215 jsonObj->setParameters(jsonArgs); | 216 jsonObj->setParameters(jsonArgs); |
| 216 } | 217 } |
| 217 } | 218 } |
| 218 if (consoleMessage->callStack()) { | 219 if (consoleMessage->callStack()) { |
| 219 jsonObj->setStackTrace(consoleMessage->callStack()->buildInspectorArray(
)); | 220 jsonObj->setStackTrace(consoleMessage->callStack()->buildInspectorArray(
)); |
| 220 RefPtrWillBeRawPtr<ScriptAsyncCallStack> asyncCallStack = consoleMessage
->callStack()->asyncCallStack(); | 221 RefPtrWillBeRawPtr<ScriptAsyncCallStack> asyncCallStack = consoleMessage
->callStack()->asyncCallStack(); |
| 221 if (asyncCallStack) | 222 if (asyncCallStack) |
| 222 jsonObj->setAsyncStackTrace(asyncCallStack->buildInspectorObject()); | 223 jsonObj->setAsyncStackTrace(asyncCallStack->buildInspectorObject()); |
| 223 } | 224 } |
| 225 if (consoleMessage->messageId()) |
| 226 jsonObj->setMessageId(consoleMessage->messageId()); |
| 227 if (consoleMessage->relatedMessageId()) |
| 228 jsonObj->setRelatedMessageId(consoleMessage->relatedMessageId()); |
| 224 frontend()->messageAdded(jsonObj); | 229 frontend()->messageAdded(jsonObj); |
| 225 frontend()->flush(); | 230 frontend()->flush(); |
| 226 } | 231 } |
| 227 | 232 |
| 228 } // namespace blink | 233 } // namespace blink |
| OLD | NEW |