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

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

Issue 329323002: Deprecate support for xhr.withCredentials for synchronous requests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: only display deprecated message without changing existing behavior Created 6 years, 6 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
« Source/core/frame/UseCounter.cpp ('K') | « Source/core/frame/UseCounter.cpp ('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 3befd8e2073a228de6f5b8b423db4ba35ff31784..6d5bc975d8f7cd7aee6ec313d023a477b97a4d11 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -36,6 +36,8 @@
#include "core/fileapi/Blob.h"
#include "core/fileapi/File.h"
#include "core/fileapi/Stream.h"
+#include "core/frame/Settings.h"
+#include "core/frame/UseCounter.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/DOMFormData.h"
#include "core/html/HTMLDocument.h"
@@ -43,7 +45,6 @@
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InspectorTraceEvents.h"
#include "core/loader/ThreadableLoader.h"
-#include "core/frame/Settings.h"
#include "core/xml/XMLHttpRequestProgressEvent.h"
#include "core/xml/XMLHttpRequestUpload.h"
#include "platform/Logging.h"
@@ -486,6 +487,12 @@ void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta
return;
}
+ // FIXME: According to XMLHttpRequest Level 2 we should throw InvalidAccessError exception here.
+ // However for time being only throw warning message to console for web developers.
Inactive 2014/06/16 18:05:47 s/throw/print a/
+ if (!m_async && executionContext()->isDocument()) {
sof 2014/06/16 18:11:12 Remove the braces?
+ UseCounter::countDeprecation(document(), UseCounter::SyncXHRWithCredentials);
+ }
+
m_includeCredentials = value;
}
« Source/core/frame/UseCounter.cpp ('K') | « Source/core/frame/UseCounter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698