| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> |
| 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> |
| 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2012 Intel Corporation | 6 * Copyright (C) 2012 Intel Corporation |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 // We can safely expose the URL to JavaScript, as these checks happen | 614 // We can safely expose the URL to JavaScript, as these checks happen |
| 615 // synchronously before redirection. JavaScript receives no new information. | 615 // synchronously before redirection. JavaScript receives no new information. |
| 616 exceptionState.throwSecurityError( | 616 exceptionState.throwSecurityError( |
| 617 "Refused to connect to '" + url.elidedString() + | 617 "Refused to connect to '" + url.elidedString() + |
| 618 "' because it violates the document's Content Security Policy."); | 618 "' because it violates the document's Content Security Policy."); |
| 619 return; | 619 return; |
| 620 } | 620 } |
| 621 | 621 |
| 622 if (!async && getExecutionContext()->isDocument()) { | 622 if (!async && getExecutionContext()->isDocument()) { |
| 623 if (document()->settings() && | 623 if (document()->settings() && |
| 624 !document()->settings()->syncXHRInDocumentsEnabled()) { | 624 !document()->settings()->getSyncXHRInDocumentsEnabled()) { |
| 625 exceptionState.throwDOMException( | 625 exceptionState.throwDOMException( |
| 626 InvalidAccessError, | 626 InvalidAccessError, |
| 627 "Synchronous requests are disabled for this page."); | 627 "Synchronous requests are disabled for this page."); |
| 628 return; | 628 return; |
| 629 } | 629 } |
| 630 | 630 |
| 631 // Newer functionality is not available to synchronous requests in window | 631 // Newer functionality is not available to synchronous requests in window |
| 632 // contexts, as a spec-mandated attempt to discourage synchronous XHR use. | 632 // contexts, as a spec-mandated attempt to discourage synchronous XHR use. |
| 633 // responseType is one such piece of functionality. | 633 // responseType is one such piece of functionality. |
| 634 if (m_responseTypeCode != ResponseTypeDefault) { | 634 if (m_responseTypeCode != ResponseTypeDefault) { |
| (...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1846 visitor->traceWrappers(m_responseDocument); | 1846 visitor->traceWrappers(m_responseDocument); |
| 1847 visitor->traceWrappers(m_responseArrayBuffer); | 1847 visitor->traceWrappers(m_responseArrayBuffer); |
| 1848 XMLHttpRequestEventTarget::traceWrappers(visitor); | 1848 XMLHttpRequestEventTarget::traceWrappers(visitor); |
| 1849 } | 1849 } |
| 1850 | 1850 |
| 1851 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr) { | 1851 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr) { |
| 1852 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr); | 1852 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr); |
| 1853 } | 1853 } |
| 1854 | 1854 |
| 1855 } // namespace blink | 1855 } // namespace blink |
| OLD | NEW |