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

Side by Side Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 2143483002: Use the single char overload of append() when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org>
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org>
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved.
6 * Copyright (C) 2012 Intel Corporation 6 * Copyright (C) 2012 Intel Corporation
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 void XMLHttpRequest::throwForLoadFailureIfNeeded(ExceptionState& exceptionState, const String& reason) 830 void XMLHttpRequest::throwForLoadFailureIfNeeded(ExceptionState& exceptionState, const String& reason)
831 { 831 {
832 if (m_error && !m_exceptionCode) 832 if (m_error && !m_exceptionCode)
833 m_exceptionCode = NetworkError; 833 m_exceptionCode = NetworkError;
834 834
835 if (!m_exceptionCode) 835 if (!m_exceptionCode)
836 return; 836 return;
837 837
838 String message = "Failed to load '" + m_url.elidedString() + "'"; 838 String message = "Failed to load '" + m_url.elidedString() + "'";
839 if (reason.isNull()) { 839 if (reason.isNull()) {
840 message.append("."); 840 message.append('.');
841 } else { 841 } else {
842 message.append(": "); 842 message.append(": ");
843 message.append(reason); 843 message.append(reason);
844 } 844 }
845 845
846 exceptionState.throwDOMException(m_exceptionCode, message); 846 exceptionState.throwDOMException(m_exceptionCode, message);
847 } 847 }
848 848
849 void XMLHttpRequest::createRequest(PassRefPtr<EncodedFormData> httpBody, Excepti onState& exceptionState) 849 void XMLHttpRequest::createRequest(PassRefPtr<EncodedFormData> httpBody, Excepti onState& exceptionState)
850 { 850 {
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 visitor->trace(m_responseArrayBuffer); 1710 visitor->trace(m_responseArrayBuffer);
1711 visitor->trace(m_progressEventThrottle); 1711 visitor->trace(m_progressEventThrottle);
1712 visitor->trace(m_upload); 1712 visitor->trace(m_upload);
1713 visitor->trace(m_blobLoader); 1713 visitor->trace(m_blobLoader);
1714 XMLHttpRequestEventTarget::trace(visitor); 1714 XMLHttpRequestEventTarget::trace(visitor);
1715 DocumentParserClient::trace(visitor); 1715 DocumentParserClient::trace(visitor);
1716 ActiveDOMObject::trace(visitor); 1716 ActiveDOMObject::trace(visitor);
1717 } 1717 }
1718 1718
1719 } // namespace blink 1719 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698