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

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

Issue 1304943004: Revert of Make m_executeScriptsWaitingForResourcesTimer a loading task (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | « Source/core/dom/Document.h ('k') | no next file » | 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 1306da3d56b5c1f22b34eeed4aff03f639f19ad0..0f98d181f0a27fe4b9b2eea4ce4dc67671d68113 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -212,7 +212,6 @@
#include "public/platform/Platform.h"
#include "wtf/CurrentTime.h"
#include "wtf/DateMath.h"
-#include "wtf/Functional.h"
#include "wtf/HashFunctions.h"
#include "wtf/MainThread.h"
#include "wtf/StdLibExtras.h"
@@ -381,7 +380,7 @@
, m_paginatedForScreen(false)
, m_compatibilityMode(NoQuirksMode)
, m_compatibilityModeLocked(false)
- , m_executeScriptsWaitingForResourcesTask(WTF::bind(&Document::executeScriptsWaitingForResources, this))
+ , m_executeScriptsWaitingForResourcesTimer(this, &Document::executeScriptsWaitingForResourcesTimerFired)
, m_hasAutofocused(false)
, m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired)
, m_domTreeVersion(++s_globalTreeVersion)
@@ -2957,8 +2956,7 @@
void Document::didLoadAllScriptBlockingResources()
{
- Platform::current()->currentThread()->scheduler()->postLoadingTask(
- FROM_HERE, m_executeScriptsWaitingForResourcesTask.cancelAndCreate());
+ m_executeScriptsWaitingForResourcesTimer.startOneShot(0, FROM_HERE);
if (frame())
frame()->loader().client()->didRemoveAllPendingStylesheet();
@@ -2967,7 +2965,7 @@
view()->processUrlFragment(m_url);
}
-void Document::executeScriptsWaitingForResources()
+void Document::executeScriptsWaitingForResourcesTimerFired(Timer<Document>*)
{
if (!isRenderingReady())
return;
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698