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

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

Issue 486703002: Revert of XMLHttpRequest::overrideMimeType should throw InvalidStateError (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/xml/XMLHttpRequest.h ('k') | Source/core/xml/XMLHttpRequest.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index 82177442b8837cf04c73b695ae6c8633dca5b886..30c501640c68d1f1d7c453ae08f7ca615b3f6e22 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -1033,14 +1033,12 @@
dispatchProgressEvent(EventTypeNames::loadend, receivedLength, expectedLength);
}
-void XMLHttpRequest::overrideMimeType(const AtomicString& mimeType, ExceptionState& exceptionState)
-{
- if (m_state == LOADING || m_state == DONE) {
- exceptionState.throwDOMException(InvalidStateError, "MimeType cannot be overridden when the state is LOADING or DONE.");
- return;
- }
-
- m_mimeTypeOverride = mimeType;
+void XMLHttpRequest::overrideMimeType(const AtomicString& override)
+{
+ // FIXME: This method must throw an InvalidStateError exception when the
+ // XHR is in the LOADING or DONE state. http://crbug.com/402375
+
+ m_mimeTypeOverride = override;
}
void XMLHttpRequest::setRequestHeader(const AtomicString& name, const AtomicString& value, ExceptionState& exceptionState)
« no previous file with comments | « Source/core/xml/XMLHttpRequest.h ('k') | Source/core/xml/XMLHttpRequest.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698