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

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

Issue 1334243004: Post DOMTimers on the corresponding LocalFrame's timer queue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed layout test failures. 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 | « no previous file | Source/core/frame/DOMTimer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 86a42c439cb6556211b4ffdff80913557540d86d..6909302be6523b9f04816d497c7ae54b939a457c 100644
--- a/Source/core/dom/Document.cpp
+++ b/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);
@@ -2202,6 +2205,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,
@@ -4835,6 +4840,7 @@ void Document::didUpdateSecurityOrigin()
{
if (!m_frame)
return;
+ m_frame->updateFrameSecurityOrigin();
m_frame->script().updateSecurityOrigin(securityOrigin());
}
« no previous file with comments | « no previous file | Source/core/frame/DOMTimer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698