Index: Source/core/xml/XMLHttpRequest.h |
diff --git a/Source/core/xml/XMLHttpRequest.h b/Source/core/xml/XMLHttpRequest.h |
index ad3546d55fd71439db1ed5813fe0e1e5681be0c7..67dbbd8f8ee8c7307a043d5fa13077f47a5de783 100644 |
--- a/Source/core/xml/XMLHttpRequest.h |
+++ b/Source/core/xml/XMLHttpRequest.h |
@@ -83,7 +83,6 @@ public: |
}; |
virtual void contextDestroyed(); |
- virtual void didTimeout(); |
virtual bool canSuspend() const; |
virtual void suspend(ReasonForSuspension); |
virtual void resume(); |
@@ -173,6 +172,8 @@ private: |
String getRequestHeader(const AtomicString& name) const; |
void setRequestHeaderInternal(const AtomicString& name, const String& value); |
+ // Changes m_state and dispatches a readyStateChange event if new m_state |
+ // value is different from last one. |
void changeState(State newState); |
void callReadyStateChangeListener(); |
void dropProtectionSoon(); |
@@ -184,9 +185,17 @@ private: |
void createRequest(ExceptionState&); |
- void genericError(); |
- void networkError(); |
- void abortError(); |
+ // Dispatches an event of the specified type to m_upload and |
+ // m_progressEventThrottle. |
+ void dispatchEventAndLoadEnd(const AtomicString&); |
+ // Does clean up common for all kind of didFail() call. |
+ void handleDidFailGeneric(); |
+ // Handles didFail() call not caused by cancellation or timeout. |
+ void handleNetworkError(); |
+ // Handles didFail() call triggered by m_loader->cancel(). |
+ void handleDidCancel(); |
+ // Handles didFail() call for timeout. |
+ void handleDidTimeout(); |
OwnPtr<XMLHttpRequestUpload> m_upload; |
@@ -229,6 +238,9 @@ private: |
unsigned m_lastSendLineNumber; |
String m_lastSendURL; |
+ // An exception to throw in synchronous mode. It's set when failure |
+ // notification is received from m_loader and thrown at the end of send() if |
+ // any. |
ExceptionCode m_exceptionCode; |
XMLHttpRequestProgressEventThrottle m_progressEventThrottle; |