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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2172153002: Move FrameLoader completion check timer to loading task runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't lazy create the frame scheduler Created 4 years, 5 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/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index ccb59c9d1649bfd00846ebd78fbd0b4b0676d3a7..8fc2931d6b4c1b76771e0d737940d2a249debd03 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -380,7 +380,6 @@ void LocalFrame::detach(FrameDetachType type)
SubframeLoadingDisabler disabler(*document());
m_loader.dispatchUnloadEvent();
detachChildren();
- m_frameScheduler.reset();
// All done if detaching the subframes brought about a detach of this frame also.
if (!client())
@@ -397,8 +396,6 @@ void LocalFrame::detach(FrameDetachType type)
// - Document::detachLayoutTree()'s deferred widget updates can run script.
ScriptForbiddenScope forbidScript;
m_loader.clear();
- // Clear FrameScheduler again in case it is recreated in scripting.
- m_frameScheduler.reset();
if (!client())
return;
@@ -427,6 +424,7 @@ void LocalFrame::detach(FrameDetachType type)
Frame::detach(type);
m_supplements.clear();
+ m_frameScheduler.reset();
WeakIdentifierMap<LocalFrame>::notifyObjectDestroyed(this);
}
@@ -806,6 +804,7 @@ bool LocalFrame::shouldThrottleRendering() const
inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameOwner* owner, ServiceRegistry* serviceRegistry)
: Frame(client, host, owner)
+ , m_frameScheduler(page()->chromeClient().createFrameScheduler(client->frameBlameContext()))
, m_loader(this)
, m_navigationScheduler(NavigationScheduler::create(this))
, m_script(ScriptController::create(this))
@@ -829,10 +828,6 @@ inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
WebFrameScheduler* LocalFrame::frameScheduler()
{
- if (!m_frameScheduler.get())
- m_frameScheduler = page()->chromeClient().createFrameScheduler(client()->frameBlameContext());
-
- ASSERT(m_frameScheduler.get());
return m_frameScheduler.get();
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698