OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 rights reserved. | 6 rights reserved. |
7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
8 | 8 |
9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 // Similarly, a request with manually added revalidation headers can lead to a | 834 // Similarly, a request with manually added revalidation headers can lead to a |
835 // 304 response for a request that wasn't flagged as a revalidation attempt. | 835 // 304 response for a request that wasn't flagged as a revalidation attempt. |
836 // Normally, successful revalidation will maintain the original response's | 836 // Normally, successful revalidation will maintain the original response's |
837 // status code, but for a manual revalidation the response code remains 304. | 837 // status code, but for a manual revalidation the response code remains 304. |
838 // In this case, the Resource likely has insufficient context to provide a | 838 // In this case, the Resource likely has insufficient context to provide a |
839 // useful cache hit or revalidation. See http://crbug.com/643659 | 839 // useful cache hit or revalidation. See http://crbug.com/643659 |
840 if (request.isConditional() || | 840 if (request.isConditional() || |
841 existingResource->response().httpStatusCode() == 304) | 841 existingResource->response().httpStatusCode() == 304) |
842 return Reload; | 842 return Reload; |
843 | 843 |
844 // Don't try to reuse an in-progress async request for a new sync request. | |
845 if (fetchRequest.options().synchronousPolicy == RequestSynchronously && | |
846 existingResource->isLoading()) | |
847 return Reload; | |
848 | |
849 // Don't reload resources while pasting. | 844 // Don't reload resources while pasting. |
850 if (m_allowStaleResources) | 845 if (m_allowStaleResources) |
851 return Use; | 846 return Use; |
852 | 847 |
853 if (!fetchRequest.options().canReuseRequest(existingResource->options())) | 848 if (!fetchRequest.options().canReuseRequest(existingResource->options())) |
854 return Reload; | 849 return Reload; |
855 | 850 |
856 // Always use preloads. | 851 // Always use preloads. |
857 if (existingResource->isPreloaded()) | 852 if (existingResource->isPreloaded()) |
858 return Use; | 853 return Use; |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 visitor->trace(m_context); | 1571 visitor->trace(m_context); |
1577 visitor->trace(m_archive); | 1572 visitor->trace(m_archive); |
1578 visitor->trace(m_loaders); | 1573 visitor->trace(m_loaders); |
1579 visitor->trace(m_nonBlockingLoaders); | 1574 visitor->trace(m_nonBlockingLoaders); |
1580 visitor->trace(m_documentResources); | 1575 visitor->trace(m_documentResources); |
1581 visitor->trace(m_preloads); | 1576 visitor->trace(m_preloads); |
1582 visitor->trace(m_resourceTimingInfoMap); | 1577 visitor->trace(m_resourceTimingInfoMap); |
1583 } | 1578 } |
1584 | 1579 |
1585 } // namespace blink | 1580 } // namespace blink |
OLD | NEW |