Chromium Code Reviews| Index: Source/core/xml/XMLHttpRequest.cpp |
| diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp |
| index 7fe4b47433d6a577db730aa2ccf75c78053f12e0..a901d2a4137b57fade5987ac6edd6063f52774d9 100644 |
| --- a/Source/core/xml/XMLHttpRequest.cpp |
| +++ b/Source/core/xml/XMLHttpRequest.cpp |
| @@ -592,6 +592,12 @@ void XMLHttpRequest::open(const AtomicString& method, const KURL& url, bool asyn |
| exceptionState.throwDOMException(InvalidAccessError, "Synchronous requests must not set a timeout."); |
| return; |
| } |
| + |
| + // Here we just warn that firing sync XHR's may affect responsiveness. |
| + // Eventually sync xhr will be deprecated and an "InvalidAccessError" exception thrown. |
| + // Refer : https://xhr.spec.whatwg.org/#sync-warning |
| + executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel |
| + , "Avoid synchronous requests as it hampers user experience due to unresponsiveness of the web page.Refer https://xhr.spec.whatwg.org/#sync-warning.")); |
|
tyoshino (SeeGerritForStatus)
2014/09/19 11:03:10
Insert a space between "page." and "Refer"
Please
Mayur Kankanwadi
2014/09/19 11:24:17
Done.
|
| } |
| m_method = uppercaseKnownHTTPMethod(method); |