Chromium Code Reviews| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 479 } | 479 } |
| 480 } | 480 } |
| 481 | 481 |
| 482 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta te) | 482 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta te) |
| 483 { | 483 { |
| 484 if (m_state > OPENED || m_loader) { | 484 if (m_state > OPENED || m_loader) { |
| 485 exceptionState.throwDOMException(InvalidStateError, "The value may only be set if the object's state is UNSENT or OPENED."); | 485 exceptionState.throwDOMException(InvalidStateError, "The value may only be set if the object's state is UNSENT or OPENED."); |
| 486 return; | 486 return; |
| 487 } | 487 } |
| 488 | 488 |
| 489 // FIXME: According to XMLHttpRequest Level 2 we should throw InvalidAccessE rror exception here. | |
| 490 // However for time being only throw warning message to console to give web developers time to update. | |
| 491 if (!m_async && executionContext()->isDocument()) { | |
| 492 String consoleMessage("Support for withCredentials deprecated for synchr onous requests."); | |
|
Inactive
2014/06/12 13:28:39
If you do this, you will like need to add a UseCou
| |
| 493 executionContext()->addConsoleMessage(JSMessageSource, WarningMessageLev el, consoleMessage); | |
| 494 return; | |
| 495 } | |
| 496 | |
| 489 m_includeCredentials = value; | 497 m_includeCredentials = value; |
| 490 } | 498 } |
| 491 | 499 |
| 492 bool XMLHttpRequest::isAllowedHTTPMethod(const String& method) | 500 bool XMLHttpRequest::isAllowedHTTPMethod(const String& method) |
| 493 { | 501 { |
| 494 return !equalIgnoringCase(method, "TRACE") | 502 return !equalIgnoringCase(method, "TRACE") |
| 495 && !equalIgnoringCase(method, "TRACK") | 503 && !equalIgnoringCase(method, "TRACK") |
| 496 && !equalIgnoringCase(method, "CONNECT"); | 504 && !equalIgnoringCase(method, "CONNECT"); |
| 497 } | 505 } |
| 498 | 506 |
| (...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1458 { | 1466 { |
| 1459 visitor->trace(m_responseBlob); | 1467 visitor->trace(m_responseBlob); |
| 1460 visitor->trace(m_responseStream); | 1468 visitor->trace(m_responseStream); |
| 1461 visitor->trace(m_responseDocument); | 1469 visitor->trace(m_responseDocument); |
| 1462 visitor->trace(m_progressEventThrottle); | 1470 visitor->trace(m_progressEventThrottle); |
| 1463 visitor->trace(m_upload); | 1471 visitor->trace(m_upload); |
| 1464 XMLHttpRequestEventTarget::trace(visitor); | 1472 XMLHttpRequestEventTarget::trace(visitor); |
| 1465 } | 1473 } |
| 1466 | 1474 |
| 1467 } // namespace WebCore | 1475 } // namespace WebCore |
| OLD | NEW |