Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 2257053002: Fix XHR stale comments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 { 1329 {
1330 NETWORK_DVLOG(1) << this << " didFail()"; 1330 NETWORK_DVLOG(1) << this << " didFail()";
1331 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel); 1331 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel);
1332 1332
1333 // If we are already in an error state, for instance we called abort(), bail out early. 1333 // If we are already in an error state, for instance we called abort(), bail out early.
1334 if (m_error) 1334 if (m_error)
1335 return; 1335 return;
1336 1336
1337 if (error.isCancellation()) { 1337 if (error.isCancellation()) {
1338 handleDidCancel(); 1338 handleDidCancel();
1339 // Now the XMLHttpRequest instance may be dead.
1340 return; 1339 return;
1341 } 1340 }
1342 1341
1343 if (error.isTimeout()) { 1342 if (error.isTimeout()) {
1344 handleDidTimeout(); 1343 handleDidTimeout();
1345 // Now the XMLHttpRequest instance may be dead.
1346 return; 1344 return;
1347 } 1345 }
1348 1346
1349 // Network failures are already reported to Web Inspector by ResourceLoader. 1347 // Network failures are already reported to Web Inspector by ResourceLoader.
1350 if (error.domain() == errorDomainBlinkInternal) 1348 if (error.domain() == errorDomainBlinkInternal)
1351 logConsoleError(getExecutionContext(), "XMLHttpRequest cannot load " + e rror.failingURL() + ". " + error.localizedDescription()); 1349 logConsoleError(getExecutionContext(), "XMLHttpRequest cannot load " + e rror.failingURL() + ". " + error.localizedDescription());
1352 1350
1353 handleNetworkError(); 1351 handleNetworkError();
1354 // Now the XMLHttpRequest instance may be dead.
1355 } 1352 }
1356 1353
1357 void XMLHttpRequest::didFailRedirectCheck() 1354 void XMLHttpRequest::didFailRedirectCheck()
1358 { 1355 {
1359 NETWORK_DVLOG(1) << this << " didFailRedirectCheck()"; 1356 NETWORK_DVLOG(1) << this << " didFailRedirectCheck()";
1360 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel); 1357 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel);
1361 1358
1362 handleNetworkError(); 1359 handleNetworkError();
1363 // Now the XMLHttpRequest instance may be dead.
1364 } 1360 }
1365 1361
1366 void XMLHttpRequest::didFinishLoading(unsigned long identifier, double) 1362 void XMLHttpRequest::didFinishLoading(unsigned long identifier, double)
1367 { 1363 {
1368 NETWORK_DVLOG(1) << this << " didFinishLoading(" << identifier << ")"; 1364 NETWORK_DVLOG(1) << this << " didFinishLoading(" << identifier << ")";
1369 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel); 1365 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel);
1370 1366
1371 if (m_error) 1367 if (m_error)
1372 return; 1368 return;
1373 1369
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 visitor->traceWrappers(m_responseDocument); 1718 visitor->traceWrappers(m_responseDocument);
1723 visitor->traceWrappers(m_responseArrayBuffer); 1719 visitor->traceWrappers(m_responseArrayBuffer);
1724 } 1720 }
1725 1721
1726 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr) 1722 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr)
1727 { 1723 {
1728 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr); 1724 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr);
1729 } 1725 }
1730 1726
1731 } // namespace blink 1727 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698