Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameConsole.cpp

Issue 2017303002: Revert of Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp ('k') | third_party/WebKit/Source/core/frame/FrameSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698