| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 | 159 |
| 160 void FrameConsole::didFailLoading(unsigned long requestIdentifier, const Resourc
eError& error) | 160 void FrameConsole::didFailLoading(unsigned long requestIdentifier, const Resourc
eError& error) |
| 161 { | 161 { |
| 162 if (error.isCancellation()) // Report failures only. | 162 if (error.isCancellation()) // Report failures only. |
| 163 return; | 163 return; |
| 164 ConsoleMessageStorage* storage = messageStorage(); | 164 ConsoleMessageStorage* storage = messageStorage(); |
| 165 if (!storage) | 165 if (!storage) |
| 166 return; | 166 return; |
| 167 StringBuilder message; | 167 StringBuilder message; |
| 168 message.append("Failed to load resource"); | 168 message.appendLiteral("Failed to load resource"); |
| 169 if (!error.localizedDescription().isEmpty()) { | 169 if (!error.localizedDescription().isEmpty()) { |
| 170 message.append(": "); | 170 message.appendLiteral(": "); |
| 171 message.append(error.localizedDescription()); | 171 message.append(error.localizedDescription()); |
| 172 } | 172 } |
| 173 ConsoleMessage* consoleMessage = ConsoleMessage::createForRequest(NetworkMes
sageSource, ErrorMessageLevel, message.toString(), error.failingURL(), requestId
entifier); | 173 ConsoleMessage* consoleMessage = ConsoleMessage::createForRequest(NetworkMes
sageSource, ErrorMessageLevel, message.toString(), error.failingURL(), requestId
entifier); |
| 174 storage->reportMessage(m_frame->document(), consoleMessage); | 174 storage->reportMessage(m_frame->document(), consoleMessage); |
| 175 } | 175 } |
| 176 | 176 |
| 177 DEFINE_TRACE(FrameConsole) | 177 DEFINE_TRACE(FrameConsole) |
| 178 { | 178 { |
| 179 visitor->trace(m_frame); | 179 visitor->trace(m_frame); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace blink | 182 } // namespace blink |
| OLD | NEW |