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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 } | 975 } |
976 | 976 |
977 void XMLHttpRequest::handleNetworkError() | 977 void XMLHttpRequest::handleNetworkError() |
978 { | 978 { |
979 WTF_LOG(Network, "XMLHttpRequest %p handleNetworkError()", this); | 979 WTF_LOG(Network, "XMLHttpRequest %p handleNetworkError()", this); |
980 | 980 |
981 // Response is cleared next, save needed progress event data. | 981 // Response is cleared next, save needed progress event data. |
982 long long expectedLength = m_response.expectedContentLength(); | 982 long long expectedLength = m_response.expectedContentLength(); |
983 long long receivedLength = m_receivedLength; | 983 long long receivedLength = m_receivedLength; |
984 | 984 |
| 985 if (!internalAbort()) |
| 986 return; |
| 987 |
985 handleDidFailGeneric(); | 988 handleDidFailGeneric(); |
986 handleRequestError(NetworkError, EventTypeNames::error, receivedLength, expe
ctedLength); | 989 handleRequestError(NetworkError, EventTypeNames::error, receivedLength, expe
ctedLength); |
987 internalAbort(); | |
988 } | 990 } |
989 | 991 |
990 void XMLHttpRequest::handleDidCancel() | 992 void XMLHttpRequest::handleDidCancel() |
991 { | 993 { |
992 WTF_LOG(Network, "XMLHttpRequest %p handleDidCancel()", this); | 994 WTF_LOG(Network, "XMLHttpRequest %p handleDidCancel()", this); |
993 | 995 |
994 // Response is cleared next, save needed progress event data. | 996 // Response is cleared next, save needed progress event data. |
995 long long expectedLength = m_response.expectedContentLength(); | 997 long long expectedLength = m_response.expectedContentLength(); |
996 long long receivedLength = m_receivedLength; | 998 long long receivedLength = m_receivedLength; |
997 | 999 |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 { | 1418 { |
1417 visitor->trace(m_responseBlob); | 1419 visitor->trace(m_responseBlob); |
1418 visitor->trace(m_responseStream); | 1420 visitor->trace(m_responseStream); |
1419 visitor->trace(m_responseDocument); | 1421 visitor->trace(m_responseDocument); |
1420 visitor->trace(m_progressEventThrottle); | 1422 visitor->trace(m_progressEventThrottle); |
1421 visitor->trace(m_upload); | 1423 visitor->trace(m_upload); |
1422 XMLHttpRequestEventTarget::trace(visitor); | 1424 XMLHttpRequestEventTarget::trace(visitor); |
1423 } | 1425 } |
1424 | 1426 |
1425 } // namespace blink | 1427 } // namespace blink |
OLD | NEW |