Chromium Code Reviews| 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; |
| } |