Index: Source/core/dom/ScriptRunner.h |
diff --git a/Source/core/dom/ScriptRunner.h b/Source/core/dom/ScriptRunner.h |
index a6e745afa5ed4aef4feb18b894807ef212e7f66b..d11edbc3130644d7995a8c3e9c019bb2eaad5a9f 100644 |
--- a/Source/core/dom/ScriptRunner.h |
+++ b/Source/core/dom/ScriptRunner.h |
@@ -27,12 +27,12 @@ |
#define ScriptRunner_h |
#include "core/fetch/ResourcePtr.h" |
-#include "platform/Timer.h" |
#include "platform/heap/Handle.h" |
+#include "platform/scheduler/CancellableTaskFactory.h" |
+#include "wtf/Deque.h" |
#include "wtf/HashMap.h" |
#include "wtf/Noncopyable.h" |
#include "wtf/PassOwnPtr.h" |
-#include "wtf/Vector.h" |
namespace blink { |
@@ -63,18 +63,22 @@ public: |
private: |
explicit ScriptRunner(Document*); |
- void timerFired(Timer<ScriptRunner>*); |
+ void executeScripts(); |
void addPendingAsyncScript(ScriptLoader*); |
void movePendingAsyncScript(ScriptRunner*, ScriptLoader*); |
+ bool yieldForHighPriorityWork(); |
+ |
+ void postTaskIfOneIsNotAlreadyInFlight(); |
+ |
RawPtrWillBeMember<Document> m_document; |
- WillBeHeapVector<RawPtrWillBeMember<ScriptLoader> > m_scriptsToExecuteInOrder; |
+ WillBeHeapDeque<RawPtrWillBeMember<ScriptLoader>> m_scriptsToExecuteInOrder; |
// http://www.whatwg.org/specs/web-apps/current-work/#set-of-scripts-that-will-execute-as-soon-as-possible |
- WillBeHeapVector<RawPtrWillBeMember<ScriptLoader> > m_scriptsToExecuteSoon; |
+ WillBeHeapDeque<RawPtrWillBeMember<ScriptLoader>> m_scriptsToExecuteSoon; |
WillBeHeapHashSet<RawPtrWillBeMember<ScriptLoader> > m_pendingAsyncScripts; |
- Timer<ScriptRunner> m_timer; |
+ CancellableTaskFactory m_executeScriptsTaskFactory; |
}; |
} |