| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 return; | 84 return; |
| 85 | 85 |
| 86 if (callStack) | 86 if (callStack) |
| 87 InspectorInstrumentation::addMessageToConsole(page, source, LogMessageTy
pe, level, message, callStack, requestIdentifier); | 87 InspectorInstrumentation::addMessageToConsole(page, source, LogMessageTy
pe, level, message, callStack, requestIdentifier); |
| 88 else | 88 else |
| 89 InspectorInstrumentation::addMessageToConsole(page, source, LogMessageTy
pe, level, message, url, lineNumber, columnNumber, state, requestIdentifier); | 89 InspectorInstrumentation::addMessageToConsole(page, source, LogMessageTy
pe, level, message, url, lineNumber, columnNumber, state, requestIdentifier); |
| 90 | 90 |
| 91 if (source == CSSMessageSource) | 91 if (source == CSSMessageSource) |
| 92 return; | 92 return; |
| 93 | 93 |
| 94 page->chrome().client()->addMessageToConsole(source, level, message, lineNum
ber, url); | 94 String details; |
| 95 if (page->chrome().client()->shouldReportDetailedMessage(state ? state->cont
ext() : v8::Handle<v8::Context>(), url)) { |
| 96 String executionContextURL = page->mainFrame()->document()->url().string
(); |
| 97 if (callStack) |
| 98 details = page->chrome().generateConsoleMessageDetails(callStack, ex
ecutionContextURL); |
| 99 else |
| 100 details = page->chrome().generateConsoleMessageDetails(lineNumber, c
olumnNumber, url, "", executionContextURL); |
| 101 } |
| 102 page->chrome().client()->addMessageToConsole(source, level, message, lineNum
ber, url, details); |
| 95 } | 103 } |
| 96 | 104 |
| 97 // static | 105 // static |
| 98 void PageConsole::mute() | 106 void PageConsole::mute() |
| 99 { | 107 { |
| 100 muteCount++; | 108 muteCount++; |
| 101 } | 109 } |
| 102 | 110 |
| 103 // static | 111 // static |
| 104 void PageConsole::unmute() | 112 void PageConsole::unmute() |
| 105 { | 113 { |
| 106 ASSERT(muteCount > 0); | 114 ASSERT(muteCount > 0); |
| 107 muteCount--; | 115 muteCount--; |
| 108 } | 116 } |
| 109 | 117 |
| 110 } // namespace WebCore | 118 } // namespace WebCore |
| OLD | NEW |