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

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

Issue 1999463002: Cleanup ConsoleMessage interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-message-callstack-in-constructor
Patch Set: PassRefPtr + win Created 4 years, 7 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 } 121 }
122 122
123 void logConsoleError(ExecutionContext* context, const String& message) 123 void logConsoleError(ExecutionContext* context, const String& message)
124 { 124 {
125 if (!context) 125 if (!context)
126 return; 126 return;
127 // FIXME: It's not good to report the bad usage without indicating what sour ce line it came from. 127 // FIXME: It's not good to report the bad usage without indicating what sour ce line it came from.
128 // We should pass additional parameters so we can tell the console where the mistake occurred. 128 // We should pass additional parameters so we can tell the console where the mistake occurred.
129 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, Err orMessageLevel, message); 129 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, Err orMessageLevel, message);
130 consoleMessage->collectCallStack();
131 context->addConsoleMessage(consoleMessage); 130 context->addConsoleMessage(consoleMessage);
132 } 131 }
133 132
134 enum HeaderValueCategoryByRFC7230 { 133 enum HeaderValueCategoryByRFC7230 {
135 HeaderValueInvalid, 134 HeaderValueInvalid,
136 HeaderValueAffectedByNormalization, 135 HeaderValueAffectedByNormalization,
137 HeaderValueValid, 136 HeaderValueValid,
138 HeaderValueCategoryByRFC7230End 137 HeaderValueCategoryByRFC7230End
139 }; 138 };
140 139
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 visitor->trace(m_responseArrayBuffer); 1713 visitor->trace(m_responseArrayBuffer);
1715 visitor->trace(m_progressEventThrottle); 1714 visitor->trace(m_progressEventThrottle);
1716 visitor->trace(m_upload); 1715 visitor->trace(m_upload);
1717 visitor->trace(m_blobLoader); 1716 visitor->trace(m_blobLoader);
1718 XMLHttpRequestEventTarget::trace(visitor); 1717 XMLHttpRequestEventTarget::trace(visitor);
1719 DocumentParserClient::trace(visitor); 1718 DocumentParserClient::trace(visitor);
1720 ActiveDOMObject::trace(visitor); 1719 ActiveDOMObject::trace(visitor);
1721 } 1720 }
1722 1721
1723 } // namespace blink 1722 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698