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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1340343003: scheduler: Implement WebFrameScheduler and WebPageScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + fixed gn build. Created 5 years, 3 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 | « media/blink/run_all_unittests.cc ('k') | third_party/WebKit/Source/core/frame/DOMTimer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 0327babbc733c290a242ca4a8fbf123bee1d8ee2..d079b44e2d442d056acf1866b47429c33ec08594 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -215,6 +215,7 @@
#include "platform/weborigin/SchemeRegistry.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebFrameScheduler.h"
#include "wtf/CurrentTime.h"
#include "wtf/DateMath.h"
#include "wtf/Functional.h"
@@ -439,6 +440,7 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, m_timeline(AnimationTimeline::create(this))
, m_templateDocumentHost(nullptr)
, m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsTimerFired)
+ , m_timers(Platform::current()->currentThread()->scheduler()->timerTaskRunner())
, m_hasViewportUnits(false)
, m_styleRecalcElementCounter(0)
, m_parserSyncPolicy(AllowAsynchronousParsing)
@@ -449,6 +451,7 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
provideContextFeaturesToDocumentFrom(*this, *m_frame->page());
m_fetcher = m_frame->loader().documentLoader()->fetcher();
+ m_timers.setTimerTaskRunner(m_frame->frameScheduler()->timerTaskRunner());
FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this);
} else if (m_importsController) {
m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr);
@@ -2204,6 +2207,8 @@ void Document::detach(const AttachContext& context)
if (m_importsController)
HTMLImportsController::removeFrom(*this);
+ m_timers.setTimerTaskRunner(Platform::current()->currentThread()->scheduler()->timerTaskRunner());
+
// This is required, as our LocalFrame might delete itself as soon as it detaches
// us. However, this violates Node::detach() semantics, as it's never
// possible to re-attach. Eventually Document::detach() should be renamed,
@@ -4839,6 +4844,7 @@ void Document::didUpdateSecurityOrigin()
{
if (!m_frame)
return;
+ m_frame->updateFrameSecurityOrigin();
m_frame->script().updateSecurityOrigin(securityOrigin());
}
« no previous file with comments | « media/blink/run_all_unittests.cc ('k') | third_party/WebKit/Source/core/frame/DOMTimer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698