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

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

Issue 23533007: Replace responseType mismatch handling code in XMLHttpRequest::responseJSONSource() with ASSERT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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') | no next file » | 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 ced9f078707ad8d5b350cce6c2c61cc896150ef5..645c48a8bb15103b967623c7babbd700875311c1 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -224,12 +224,10 @@ ScriptString XMLHttpRequest::responseText(ExceptionState& es)
return m_responseText;
}
-ScriptString XMLHttpRequest::responseJSONSource(ExceptionState& es)
+ScriptString XMLHttpRequest::responseJSONSource()
{
- if (m_responseTypeCode != ResponseTypeJSON) {
- es.throwDOMException(InvalidStateError);
- return ScriptString();
- }
+ ASSERT(m_responseTypeCode == ResponseTypeJSON);
+
if (m_error || m_state != DONE)
return ScriptString();
return m_responseText;
« no previous file with comments | « Source/core/xml/XMLHttpRequest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698