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

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

Issue 1366883002: [Reland] Post loading tasks on the appropriate WebFrameScheduler's queue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UAF in BackgroundHTMLParser Created 5 years, 2 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) 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 #endif 165 #endif
166 } 166 }
167 167
168 ResourceFetcher::~ResourceFetcher() 168 ResourceFetcher::~ResourceFetcher()
169 { 169 {
170 #if !ENABLE(OILPAN) 170 #if !ENABLE(OILPAN)
171 clearPreloads(); 171 clearPreloads();
172 #endif 172 #endif
173 } 173 }
174 174
175 WebTaskRunner* ResourceFetcher::loadingTaskRunner()
176 {
177 if (!m_context)
178 return nullptr;
179
180 return m_context->loadingTaskRunner();
181 }
182
175 Resource* ResourceFetcher::cachedResource(const KURL& resourceURL) const 183 Resource* ResourceFetcher::cachedResource(const KURL& resourceURL) const
176 { 184 {
177 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL); 185 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL);
178 return m_documentResources.get(url).get(); 186 return m_documentResources.get(url).get();
179 } 187 }
180 188
181 bool ResourceFetcher::canAccessResource(Resource* resource, SecurityOrigin* sour ceOrigin, const KURL& url, AccessControlLoggingDecision logErrorsDecision) const 189 bool ResourceFetcher::canAccessResource(Resource* resource, SecurityOrigin* sour ceOrigin, const KURL& url, AccessControlLoggingDecision logErrorsDecision) const
182 { 190 {
183 // Redirects can change the response URL different from one of request. 191 // Redirects can change the response URL different from one of request.
184 bool forPreload = resource->isUnusedPreload(); 192 bool forPreload = resource->isUnusedPreload();
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 visitor->trace(m_archiveResourceCollection); 1113 visitor->trace(m_archiveResourceCollection);
1106 visitor->trace(m_loaders); 1114 visitor->trace(m_loaders);
1107 visitor->trace(m_nonBlockingLoaders); 1115 visitor->trace(m_nonBlockingLoaders);
1108 #if ENABLE(OILPAN) 1116 #if ENABLE(OILPAN)
1109 visitor->trace(m_preloads); 1117 visitor->trace(m_preloads);
1110 visitor->trace(m_resourceTimingInfoMap); 1118 visitor->trace(m_resourceTimingInfoMap);
1111 #endif 1119 #endif
1112 } 1120 }
1113 1121
1114 } 1122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698