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

Side by Side Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 1270343003: Oilpan: have ResourceFetcher use a prefinalizer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/fetch/ResourceFetcher.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 ResourceFetcher::ResourceFetcher(FetchContext* context) 158 ResourceFetcher::ResourceFetcher(FetchContext* context)
159 : m_context(context) 159 : m_context(context)
160 , m_garbageCollectDocumentResourcesTimer(this, &ResourceFetcher::garbageColl ectDocumentResourcesTimerFired) 160 , m_garbageCollectDocumentResourcesTimer(this, &ResourceFetcher::garbageColl ectDocumentResourcesTimerFired)
161 , m_resourceTimingReportTimer(this, &ResourceFetcher::resourceTimingReportTi merFired) 161 , m_resourceTimingReportTimer(this, &ResourceFetcher::resourceTimingReportTi merFired)
162 , m_autoLoadImages(true) 162 , m_autoLoadImages(true)
163 , m_imagesEnabled(true) 163 , m_imagesEnabled(true)
164 , m_allowStaleResources(false) 164 , m_allowStaleResources(false)
165 { 165 {
166 #if ENABLE(OILPAN)
167 ThreadState::current()->registerPreFinalizer(this);
168 #endif
166 } 169 }
167 170
168 ResourceFetcher::~ResourceFetcher() 171 ResourceFetcher::~ResourceFetcher()
169 { 172 {
173 #if !ENABLE(OILPAN)
170 clearPreloads(); 174 clearPreloads();
175 #endif
171 } 176 }
172 177
173 Resource* ResourceFetcher::cachedResource(const KURL& resourceURL) const 178 Resource* ResourceFetcher::cachedResource(const KURL& resourceURL) const
174 { 179 {
175 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL); 180 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL);
176 return m_documentResources.get(url).get(); 181 return m_documentResources.get(url).get();
177 } 182 }
178 183
179 bool ResourceFetcher::canAccessResource(Resource* resource, SecurityOrigin* sour ceOrigin, const KURL& url, AccessControlLoggingDecision logErrorsDecision) const 184 bool ResourceFetcher::canAccessResource(Resource* resource, SecurityOrigin* sour ceOrigin, const KURL& url, AccessControlLoggingDecision logErrorsDecision) const
180 { 185 {
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 visitor->trace(m_archiveResourceCollection); 1075 visitor->trace(m_archiveResourceCollection);
1071 visitor->trace(m_loaders); 1076 visitor->trace(m_loaders);
1072 visitor->trace(m_nonBlockingLoaders); 1077 visitor->trace(m_nonBlockingLoaders);
1073 #if ENABLE(OILPAN) 1078 #if ENABLE(OILPAN)
1074 visitor->trace(m_preloads); 1079 visitor->trace(m_preloads);
1075 visitor->trace(m_resourceTimingInfoMap); 1080 visitor->trace(m_resourceTimingInfoMap);
1076 #endif 1081 #endif
1077 } 1082 }
1078 1083
1079 } 1084 }
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698