Chromium Code Reviews| Index: Source/core/xml/XMLHttpRequest.cpp |
| diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp |
| index 3befd8e2073a228de6f5b8b423db4ba35ff31784..7aa0ed04895aabab1b67416981b673b5a5f2e53d 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,13 @@ 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. |
| + if (!m_async && executionContext()->isDocument()) { |
| + UseCounter::countDeprecation(document(), UseCounter::SyncXHRWithCredentials); |
| + return; |
|
sof
2014/06/16 14:21:34
If I understand your intent correctly, isn't this
Inactive
2014/06/16 17:07:32
sof@ is right, IMHO. We should probably not ignore
|
| + } |
| + |
| m_includeCredentials = value; |
| } |