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

Unified Diff: Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 1179903003: [DevTools] Log failed XHR requests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/xmlhttprequest/XMLHttpRequest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index aebbed55feeba564afe15dbc871528e88cef1202..d75347048676b26e778a719d20662e096684f8ac 100644
--- a/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -342,7 +342,6 @@ PassRefPtrWillBeRawPtr<XMLHttpRequest> XMLHttpRequest::create(ExecutionContext*
XMLHttpRequest::XMLHttpRequest(ExecutionContext* context, PassRefPtr<SecurityOrigin> securityOrigin)
: ActiveDOMObject(context)
, m_timeoutMilliseconds(0)
- , m_loaderIdentifier(0)
, m_state(UNSENT)
, m_lengthDownloadedToFile(0)
, m_receivedLength(0)
@@ -1148,8 +1147,6 @@ bool XMLHttpRequest::internalAbort()
clearVariablesForLoading();
- InspectorInstrumentation::didFailXHRLoading(executionContext(), this, this);
-
if (m_responseLegacyStream && m_state != DONE)
m_responseLegacyStream->abort();
@@ -1268,6 +1265,8 @@ void XMLHttpRequest::handleRequestError(ExceptionCode exceptionCode, const Atomi
{
WTF_LOG(Network, "XMLHttpRequest %p handleRequestError()", this);
+ InspectorInstrumentation::didFailXHRLoading(executionContext(), this, this, m_method, m_url);
+
// The request error steps for event 'type' and exception 'exceptionCode'.
if (!m_async && exceptionCode) {
@@ -1503,8 +1502,6 @@ void XMLHttpRequest::didFinishLoading(unsigned long identifier, double)
if (m_state < HEADERS_RECEIVED)
changeState(HEADERS_RECEIVED);
- m_loaderIdentifier = identifier;
-
if (m_downloadingToFile && m_responseTypeCode != ResponseTypeBlob && m_lengthDownloadedToFile) {
ASSERT(m_state == LOADING);
// In this case, we have sent the request with DownloadToFile true,
@@ -1608,11 +1605,10 @@ void XMLHttpRequest::notifyParserStopped()
void XMLHttpRequest::endLoading()
{
- InspectorInstrumentation::didFinishXHRLoading(executionContext(), this, this, m_loaderIdentifier, m_responseText, m_method, m_url);
+ InspectorInstrumentation::didFinishXHRLoading(executionContext(), this, this, m_method, m_url);
if (m_loader)
m_loader = nullptr;
- m_loaderIdentifier = 0;
changeState(DONE);
@@ -1821,6 +1817,7 @@ void XMLHttpRequest::resume()
void XMLHttpRequest::stop()
{
+ InspectorInstrumentation::didFailXHRLoading(executionContext(), this, this, m_method, m_url);
internalAbort();
}
« no previous file with comments | « Source/core/xmlhttprequest/XMLHttpRequest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698