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

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: Rebased with latest 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
« no previous file with comments | « 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 b4505ee04b4ef1190410adbf3f560f01c3b16cba..097ae1e8e1459d66c852bf904bfaf0091c2765e7 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -35,6 +35,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"
@@ -42,7 +44,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,11 @@ 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 print warning message to warn web developers.
+ if (!m_async && executionContext()->isDocument())
sof 2014/06/18 08:16:06 No need to check isDocument(), just pass in execut
maheshkk 2014/06/18 15:55:08 You are right. Once http://code.google.com/p/chrom
+ UseCounter::countDeprecation(document(), UseCounter::SyncXHRWithCredentials);
sof 2014/06/18 08:16:06 With https://codereview.chromium.org/337283003 add
maheshkk 2014/06/18 15:55:08 IMO, printing deprecated message will serve as ear
sof 2014/06/18 16:13:36 I understand what you hope is the side-effect of a
maheshkk 2014/06/18 23:53:07 Agreed. We could go by only adding UseCounter now
+
m_includeCredentials = value;
}
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698