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
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
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 Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 bool deleted = resource->deleteIfPossible(); | 1304 bool deleted = resource->deleteIfPossible(); |
1305 if (!deleted && resource->preloadResult() == Resource::PreloadNotReferen
ced) | 1305 if (!deleted && resource->preloadResult() == Resource::PreloadNotReferen
ced) |
1306 memoryCache()->remove(resource); | 1306 memoryCache()->remove(resource); |
1307 } | 1307 } |
1308 m_preloads.clear(); | 1308 m_preloads.clear(); |
1309 } | 1309 } |
1310 | 1310 |
1311 void ResourceFetcher::didFinishLoading(Resource* resource, double finishTime, in
t64_t encodedDataLength) | 1311 void ResourceFetcher::didFinishLoading(Resource* resource, double finishTime, in
t64_t encodedDataLength) |
1312 { | 1312 { |
1313 TRACE_EVENT_ASYNC_END0("net", "Resource", resource); | 1313 TRACE_EVENT_ASYNC_END0("net", "Resource", resource); |
1314 RefPtr<Document> protectDocument(m_document); | 1314 RefPtrWillBeRawPtr<Document> protectDocument(document()); |
1315 RefPtr<DocumentLoader> protectDocumentLoader(m_documentLoader); | 1315 RefPtr<DocumentLoader> protectDocumentLoader(m_documentLoader); |
1316 | 1316 |
1317 if (resource && resource->response().isHTTP() && resource->response().httpSt
atusCode() < 400 && document()) { | 1317 if (resource && resource->response().isHTTP() && resource->response().httpSt
atusCode() < 400 && document()) { |
1318 ResourceTimingInfoMap::iterator it = m_resourceTimingInfoMap.find(resour
ce); | 1318 ResourceTimingInfoMap::iterator it = m_resourceTimingInfoMap.find(resour
ce); |
1319 if (it != m_resourceTimingInfoMap.end()) { | 1319 if (it != m_resourceTimingInfoMap.end()) { |
1320 RefPtr<ResourceTimingInfo> info = it->value; | 1320 RefPtr<ResourceTimingInfo> info = it->value; |
1321 m_resourceTimingInfoMap.remove(it); | 1321 m_resourceTimingInfoMap.remove(it); |
1322 populateResourceTiming(info.get(), resource, false); | 1322 populateResourceTiming(info.get(), resource, false); |
1323 reportResourceTiming(info.get(), document(), resource->type() == Res
ource::MainResource); | 1323 reportResourceTiming(info.get(), document(), resource->type() == Res
ource::MainResource); |
1324 } | 1324 } |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 | 1575 |
1576 void ResourceFetcher::trace(Visitor* visitor) | 1576 void ResourceFetcher::trace(Visitor* visitor) |
1577 { | 1577 { |
1578 visitor->trace(m_document); | 1578 visitor->trace(m_document); |
1579 visitor->trace(m_loaders); | 1579 visitor->trace(m_loaders); |
1580 visitor->trace(m_multipartLoaders); | 1580 visitor->trace(m_multipartLoaders); |
1581 ResourceLoaderHost::trace(visitor); | 1581 ResourceLoaderHost::trace(visitor); |
1582 } | 1582 } |
1583 | 1583 |
1584 } | 1584 } |
OLD | NEW |