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

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

Issue 1962053002: Allow expensive task blocking if there is pending iframe navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use an enum Created 4 years, 7 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/loader/NavigationScheduler.cpp
diff --git a/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp b/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
index 65db3e1e9518e92c5bdcfe1a0a91163bb0ff6e6b..a9f2e79bead191ab636c6a5728c0e6090043be24 100644
--- a/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
+++ b/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
@@ -258,6 +258,7 @@ private:
NavigationScheduler::NavigationScheduler(LocalFrame* frame)
: m_frame(frame)
, m_navigateTaskFactory(CancellableTaskFactory::create(this, &NavigationScheduler::navigateTask))
+ , m_frameType(m_frame->isMainFrame() ? WebScheduler::NavigatingFrameType::kMainFrame : WebScheduler::NavigatingFrameType::kChildFrame)
{
}
@@ -266,7 +267,7 @@ NavigationScheduler::~NavigationScheduler()
// TODO(alexclarke): Can remove this if oilpan is on since any pending task should
// keep the NavigationScheduler alive.
if (m_navigateTaskFactory->isPending())
- Platform::current()->currentThread()->scheduler()->removePendingNavigation();
+ Platform::current()->currentThread()->scheduler()->removePendingNavigation(m_frameType);
}
bool NavigationScheduler::locationChangePending()
@@ -384,7 +385,7 @@ void NavigationScheduler::scheduleReload()
void NavigationScheduler::navigateTask()
{
- Platform::current()->currentThread()->scheduler()->removePendingNavigation();
+ Platform::current()->currentThread()->scheduler()->removePendingNavigation(m_frameType);
if (!m_frame->page())
return;
@@ -429,7 +430,7 @@ void NavigationScheduler::startTimer()
return;
WebScheduler* scheduler = Platform::current()->currentThread()->scheduler();
- scheduler->addPendingNavigation();
+ scheduler->addPendingNavigation(m_frameType);
scheduler->loadingTaskRunner()->postDelayedTask(
BLINK_FROM_HERE, m_navigateTaskFactory->cancelAndCreate(), m_redirect->delay() * 1000.0);
@@ -439,7 +440,7 @@ void NavigationScheduler::startTimer()
void NavigationScheduler::cancel()
{
if (m_navigateTaskFactory->isPending()) {
- Platform::current()->currentThread()->scheduler()->removePendingNavigation();
+ Platform::current()->currentThread()->scheduler()->removePendingNavigation(m_frameType);
InspectorInstrumentation::frameClearedScheduledNavigation(m_frame);
}
m_navigateTaskFactory->cancel();
« no previous file with comments | « third_party/WebKit/Source/core/loader/NavigationScheduler.h ('k') | third_party/WebKit/Source/platform/TimerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698