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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
687 | 687 |
688 if (type == ResourceLoadingFromCache && !resource->stillNeedsLoad() && !m_va lidatedURLs.contains(request.resourceRequest().url())) { | 688 if (type == ResourceLoadingFromCache && !resource->stillNeedsLoad() && !m_va lidatedURLs.contains(request.resourceRequest().url())) { |
689 // Resources loaded from memory cache should be reported the first time they're used. | 689 // Resources loaded from memory cache should be reported the first time they're used. |
690 RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(request.opt ions().initiatorInfo.name, monotonicallyIncreasingTime()); | 690 RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(request.opt ions().initiatorInfo.name, monotonicallyIncreasingTime()); |
691 populateResourceTiming(info.get(), resource, true); | 691 populateResourceTiming(info.get(), resource, true); |
692 m_scheduledResourceTimingReports.add(info, resource->type() == Resource: :MainResource); | 692 m_scheduledResourceTimingReports.add(info, resource->type() == Resource: :MainResource); |
693 if (!m_resourceTimingReportTimer.isActive()) | 693 if (!m_resourceTimingReportTimer.isActive()) |
694 m_resourceTimingReportTimer.startOneShot(0, FROM_HERE); | 694 m_resourceTimingReportTimer.startOneShot(0, FROM_HERE); |
695 } | 695 } |
696 | 696 |
697 if (m_validatedURLs.size() >= 10000) { | |
698 m_validatedURLs.clear(); | |
kouhei (in TOK)
2014/11/14 08:37:51
Can we have a ring buffer instead?
hiroshige
2014/11/14 09:02:05
Done.
kouhei (in TOK)
2014/11/14 09:15:57
Sorry, I guess this is a better approach for now.
hiroshige
2014/11/14 09:29:21
Done in Patch Set 3.
| |
699 } | |
697 m_validatedURLs.add(request.resourceRequest().url()); | 700 m_validatedURLs.add(request.resourceRequest().url()); |
698 } | 701 } |
699 | 702 |
700 ResourcePtr<Resource> ResourceFetcher::requestResource(Resource::Type type, Fetc hRequest& request) | 703 ResourcePtr<Resource> ResourceFetcher::requestResource(Resource::Type type, Fetc hRequest& request) |
701 { | 704 { |
702 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || type == Resource::Raw); | 705 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || type == Resource::Raw); |
703 | 706 |
704 TRACE_EVENT0("blink", "ResourceFetcher::requestResource"); | 707 TRACE_EVENT0("blink", "ResourceFetcher::requestResource"); |
705 | 708 |
706 KURL url = request.resourceRequest().url(); | 709 KURL url = request.resourceRequest().url(); |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1565 | 1568 |
1566 void ResourceFetcher::trace(Visitor* visitor) | 1569 void ResourceFetcher::trace(Visitor* visitor) |
1567 { | 1570 { |
1568 visitor->trace(m_document); | 1571 visitor->trace(m_document); |
1569 visitor->trace(m_loaders); | 1572 visitor->trace(m_loaders); |
1570 visitor->trace(m_multipartLoaders); | 1573 visitor->trace(m_multipartLoaders); |
1571 ResourceLoaderHost::trace(visitor); | 1574 ResourceLoaderHost::trace(visitor); |
1572 } | 1575 } |
1573 | 1576 |
1574 } | 1577 } |
OLD | NEW |