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

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

Issue 2517173002: XMLHttpRequest.abort(): follow spec wrt readyState transitions. (Closed)
Patch Set: fix pass test predicate Created 4 years, 1 month 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 | « third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index 87c5d6516dd2acdf6ad322a64c0ed535a6193948..b63b0362f6e915d426a9af772bdac1eaaa8c688a 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -340,7 +340,7 @@ Document* XMLHttpRequest::responseXML(ExceptionState& exceptionState) {
m_parsedResponse = true;
}
- return m_responseDocument.get();
+ return m_responseDocument;
}
Blob* XMLHttpRequest::responseBlob() {
@@ -400,7 +400,7 @@ DOMArrayBuffer* XMLHttpRequest::responseArrayBuffer() {
}
}
- return m_responseArrayBuffer.get();
+ return m_responseArrayBuffer;
}
void XMLHttpRequest::setTimeout(unsigned timeout,
@@ -496,7 +496,7 @@ String XMLHttpRequest::responseURL() {
XMLHttpRequestUpload* XMLHttpRequest::upload() {
if (!m_upload)
m_upload = XMLHttpRequestUpload::create(this);
- return m_upload.get();
+ return m_upload;
}
void XMLHttpRequest::trackProgress(long long length) {
@@ -1091,7 +1091,8 @@ void XMLHttpRequest::abort() {
expectedLength);
}
}
- m_state = kUnsent;
+ if (m_state == kDone)
+ m_state = kUnsent;
}
void XMLHttpRequest::clearVariablesForLoading() {
@@ -1138,7 +1139,7 @@ bool XMLHttpRequest::internalAbort() {
// If abort() called internalAbort() and a nested open() ended up
// clearing the error flag, but didn't send(), make sure the error
// flag is still set.
- bool newLoadStarted = m_loader.get();
+ bool newLoadStarted = m_loader;
if (!newLoadStarted)
m_error = true;
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698