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

Unified Diff: third_party/WebKit/Source/core/loader/EmptyClients.cpp

Issue 2544303002: Use MainThread on EmptyFrameScheduler (Closed)
Patch Set: fix Created 4 years 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 | « no previous file | 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/loader/EmptyClients.cpp
diff --git a/third_party/WebKit/Source/core/loader/EmptyClients.cpp b/third_party/WebKit/Source/core/loader/EmptyClients.cpp
index 5afe3361d9a84f136691f5dd8eb54dd7d9c8e534..099517f55753f19b49e5d05b084d99d4581d5921 100644
--- a/third_party/WebKit/Source/core/loader/EmptyClients.cpp
+++ b/third_party/WebKit/Source/core/loader/EmptyClients.cpp
@@ -71,6 +71,7 @@ class EmptyPopupMenu : public PopupMenu {
class EmptyFrameScheduler : public WebFrameScheduler {
public:
+ EmptyFrameScheduler() { DCHECK(isMainThread()); }
void setFrameVisible(bool) override {}
WebTaskRunner* loadingTaskRunner() override;
WebTaskRunner* timerTaskRunner() override;
@@ -78,15 +79,15 @@ class EmptyFrameScheduler : public WebFrameScheduler {
};
WebTaskRunner* EmptyFrameScheduler::loadingTaskRunner() {
- return Platform::current()->currentThread()->getWebTaskRunner();
+ return Platform::current()->mainThread()->getWebTaskRunner();
}
WebTaskRunner* EmptyFrameScheduler::timerTaskRunner() {
- return Platform::current()->currentThread()->getWebTaskRunner();
+ return Platform::current()->mainThread()->getWebTaskRunner();
}
WebTaskRunner* EmptyFrameScheduler::unthrottledTaskRunner() {
- return Platform::current()->currentThread()->getWebTaskRunner();
+ return Platform::current()->mainThread()->getWebTaskRunner();
}
PopupMenu* EmptyChromeClient::openPopupMenu(LocalFrame&, HTMLSelectElement&) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698