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

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

Issue 2109843003: Adds enableVirtualTime and setVirtualTimePolicy To Emulation domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test crash Created 4 years, 6 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
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 31e8389897ba03dbbff62479cf5bd80ba306983d..d9277bdfe83e917e14d86d1dae4368b0f939a2a3 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -50,6 +50,7 @@
#include "public/platform/WebCachePolicy.h"
#include "public/platform/WebURL.h"
#include "public/platform/WebURLRequest.h"
+#include "public/platform/WebViewScheduler.h"
#include "wtf/text/CString.h"
#include "wtf/text/WTFString.h"
#include <memory>
@@ -992,7 +993,11 @@ bool ResourceFetcher::startLoad(Resource* resource)
storeResourceTimingInitiatorInformation(resource);
resource->setFetcherSecurityOrigin(context().getSecurityOrigin());
- loader->start(resource->resourceRequest(), context().loadingTaskRunner(), context().defersLoading());
+ WeakPtr<WebViewScheduler> webViewScheduler;
+ // Note in some of the tests there isn't a WebViewScheduler.
+ if (context().webViewScheduler())
+ webViewScheduler = context().webViewScheduler()->createWeakPtr();
+ loader->start(resource->resourceRequest(), context().loadingTaskRunner(), webViewScheduler, context().defersLoading());
return true;
}

Powered by Google App Engine
This is Rietveld 408576698