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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2640913002: Use TaskRunnerTimer in ResourceFetcher (Closed)
Patch Set: Null check Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 59a96fcbacc43add98b3f2131979416e0dbe0917..5f25871b730cf19284137b85d30a6eb761c716f8 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -248,14 +248,17 @@ static WebURLRequest::RequestContext requestContextFromType(
ResourceFetcher::ResourceFetcher(FetchContext* newContext)
: m_context(newContext),
m_archive(context().isMainFrame() ? nullptr : context().archive()),
+ // loadingTaskRunner() is null in tests that use the null fetch context.
m_resourceTimingReportTimer(
+ context().loadingTaskRunner()
+ ? context().loadingTaskRunner()
+ : Platform::current()->currentThread()->getWebTaskRunner(),
this,
&ResourceFetcher::resourceTimingReportTimerFired),
m_autoLoadImages(true),
m_imagesEnabled(true),
m_allowStaleResources(false),
- m_imageFetched(false) {
-}
+ m_imageFetched(false) {}
ResourceFetcher::~ResourceFetcher() {}
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698