| 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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 if (!m_loader) | 1012 if (!m_loader) |
| 1013 return true; | 1013 return true; |
| 1014 | 1014 |
| 1015 // Cancelling the ThreadableLoader m_loader may result in calling | 1015 // Cancelling the ThreadableLoader m_loader may result in calling |
| 1016 // window.onload synchronously. If such an onload handler contains open() | 1016 // window.onload synchronously. If such an onload handler contains open() |
| 1017 // call on the same XMLHttpRequest object, reentry happens. | 1017 // call on the same XMLHttpRequest object, reentry happens. |
| 1018 // | 1018 // |
| 1019 // If, window.onload contains open() and send(), m_loader will be set to | 1019 // If, window.onload contains open() and send(), m_loader will be set to |
| 1020 // non 0 value. So, we cannot continue the outer open(). In such case, | 1020 // non 0 value. So, we cannot continue the outer open(). In such case, |
| 1021 // just abort the outer open() by returning false. | 1021 // just abort the outer open() by returning false. |
| 1022 RefPtr<ThreadableLoader> loader = m_loader.release(); | 1022 OwnPtr<ThreadableLoader> loader = m_loader.release(); |
| 1023 loader->cancel(); | 1023 loader->cancel(); |
| 1024 | 1024 |
| 1025 // If abort() called internalAbort() and a nested open() ended up | 1025 // If abort() called internalAbort() and a nested open() ended up |
| 1026 // clearing the error flag, but didn't send(), make sure the error | 1026 // clearing the error flag, but didn't send(), make sure the error |
| 1027 // flag is still set. | 1027 // flag is still set. |
| 1028 bool newLoadStarted = m_loader; | 1028 bool newLoadStarted = m_loader; |
| 1029 if (!newLoadStarted) | 1029 if (!newLoadStarted) |
| 1030 m_error = true; | 1030 m_error = true; |
| 1031 | 1031 |
| 1032 return !newLoadStarted; | 1032 return !newLoadStarted; |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 visitor->trace(m_responseDocumentParser); | 1702 visitor->trace(m_responseDocumentParser); |
| 1703 visitor->trace(m_progressEventThrottle); | 1703 visitor->trace(m_progressEventThrottle); |
| 1704 visitor->trace(m_upload); | 1704 visitor->trace(m_upload); |
| 1705 visitor->trace(m_blobLoader); | 1705 visitor->trace(m_blobLoader); |
| 1706 XMLHttpRequestEventTarget::trace(visitor); | 1706 XMLHttpRequestEventTarget::trace(visitor); |
| 1707 DocumentParserClient::trace(visitor); | 1707 DocumentParserClient::trace(visitor); |
| 1708 ActiveDOMObject::trace(visitor); | 1708 ActiveDOMObject::trace(visitor); |
| 1709 } | 1709 } |
| 1710 | 1710 |
| 1711 } // namespace blink | 1711 } // namespace blink |
| OLD | NEW |