void XMLHttpRequest::abort() { // internalAbort() calls dropProtection(), which may release the last reference. RefPtr<XMLHttpRequest> protect(this); bool sendFlag = m_loader; internalAbort(); // Clear headers as required by the spec m_requestHeaders.clear(); if ((m_state <= OPENED && !sendFlag) || m_state == DONE) m_state = UNSENT; else { ASSERT(!m_loader); changeState(DONE); m_state = UNSENT; } dispatchAbortEvent(); if (!m_uploadComplete) { m_uploadComplete = true; if (m_upload) m_upload->dispatchAbortEvent(); } }
void XMLHttpRequest::abortError() { genericError(); dispatchAbortEvent(); if (!m_uploadComplete) { m_uploadComplete = true; if (m_upload) m_upload->dispatchAbortEvent(); } }
void XMLHttpRequest::abort() { bool sendFlag = m_loader; internalAbort(); // Clear headers as required by the spec m_requestHeaders.clear(); m_crossSiteRequestHeaders.clear(); if ((m_state <= OPENED && !sendFlag) || m_state == DONE) m_state = UNSENT; else { ASSERT(!m_loader); changeState(DONE); m_state = UNSENT; } dispatchAbortEvent(); }
void XMLHttpRequest::abortError() { genericError(); dispatchAbortEvent(); }