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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 void FrameConsole::reportResourceResponseReceived(DocumentLoader* loader, unsign
ed long requestIdentifier, const ResourceResponse& response) | 119 void FrameConsole::reportResourceResponseReceived(DocumentLoader* loader, unsign
ed long requestIdentifier, const ResourceResponse& response) |
120 { | 120 { |
121 if (!loader) | 121 if (!loader) |
122 return; | 122 return; |
123 if (response.httpStatusCode() < 400) | 123 if (response.httpStatusCode() < 400) |
124 return; | 124 return; |
125 if (response.wasFallbackRequiredByServiceWorker()) | 125 if (response.wasFallbackRequiredByServiceWorker()) |
126 return; | 126 return; |
127 String message = "Failed to load resource: the server responded with a statu
s of " + String::number(response.httpStatusCode()) + " (" + response.httpStatusT
ext() + ')'; | 127 String message = "Failed to load resource: the server responded with a statu
s of " + String::number(response.httpStatusCode()) + " (" + response.httpStatusT
ext() + ')'; |
128 ConsoleMessage* consoleMessage = ConsoleMessage::create(NetworkMessageSource
, ErrorMessageLevel, message, response.url().getString()); | 128 ConsoleMessage* consoleMessage = ConsoleMessage::create(NetworkMessageSource
, ErrorMessageLevel, message, response.url().getString(), 0); |
129 consoleMessage->setRequestIdentifier(requestIdentifier); | 129 consoleMessage->setRequestIdentifier(requestIdentifier); |
130 addMessage(consoleMessage); | 130 addMessage(consoleMessage); |
131 } | 131 } |
132 | 132 |
133 void FrameConsole::mute() | 133 void FrameConsole::mute() |
134 { | 134 { |
135 muteCount++; | 135 muteCount++; |
136 } | 136 } |
137 | 137 |
138 void FrameConsole::unmute() | 138 void FrameConsole::unmute() |
(...skipping 29 matching lines...) Expand all Loading... |
168 return; | 168 return; |
169 ConsoleMessageStorage* storage = messageStorage(); | 169 ConsoleMessageStorage* storage = messageStorage(); |
170 if (!storage) | 170 if (!storage) |
171 return; | 171 return; |
172 StringBuilder message; | 172 StringBuilder message; |
173 message.appendLiteral("Failed to load resource"); | 173 message.appendLiteral("Failed to load resource"); |
174 if (!error.localizedDescription().isEmpty()) { | 174 if (!error.localizedDescription().isEmpty()) { |
175 message.appendLiteral(": "); | 175 message.appendLiteral(": "); |
176 message.append(error.localizedDescription()); | 176 message.append(error.localizedDescription()); |
177 } | 177 } |
178 ConsoleMessage* consoleMessage = ConsoleMessage::create(NetworkMessageSource
, ErrorMessageLevel, message.toString(), error.failingURL()); | 178 ConsoleMessage* consoleMessage = ConsoleMessage::create(NetworkMessageSource
, ErrorMessageLevel, message.toString(), error.failingURL(), 0); |
179 consoleMessage->setRequestIdentifier(requestIdentifier); | 179 consoleMessage->setRequestIdentifier(requestIdentifier); |
180 storage->reportMessage(m_frame->document(), consoleMessage); | 180 storage->reportMessage(m_frame->document(), consoleMessage); |
181 } | 181 } |
182 | 182 |
183 DEFINE_TRACE(FrameConsole) | 183 DEFINE_TRACE(FrameConsole) |
184 { | 184 { |
185 visitor->trace(m_frame); | 185 visitor->trace(m_frame); |
186 } | 186 } |
187 | 187 |
188 } // namespace blink | 188 } // namespace blink |
OLD | NEW |