| Index: Source/core/dom/ScriptRunner.cpp
|
| diff --git a/Source/core/dom/ScriptRunner.cpp b/Source/core/dom/ScriptRunner.cpp
|
| index 41a2b4b0e9a2480f77fe1b0a6d44dac9271a3a0a..748809724c54905f9089c9175b69ee405c8486d2 100644
|
| --- a/Source/core/dom/ScriptRunner.cpp
|
| +++ b/Source/core/dom/ScriptRunner.cpp
|
| @@ -30,29 +30,19 @@
|
| #include "core/dom/Element.h"
|
| #include "core/dom/ScriptLoader.h"
|
| #include "platform/heap/Handle.h"
|
| +#include "platform/scheduler/CancellableTaskFactory.h"
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebScheduler.h"
|
| #include "public/platform/WebThread.h"
|
| -#include "wtf/Functional.h"
|
| -
|
| -// This bit of magic is needed by oilpan to prevent the ScriptRunner from leaking.
|
| -namespace WTF {
|
| -template<>
|
| -struct ParamStorageTraits<blink::ScriptRunner*> : public PointerParamStorageTraits<blink::ScriptRunner*, false> {
|
| -};
|
| -}
|
|
|
| namespace blink {
|
|
|
|
|
| ScriptRunner::ScriptRunner(Document* document)
|
| : m_document(document)
|
| - , m_executeScriptsTaskFactory(WTF::bind(&ScriptRunner::executeScripts, this))
|
| + , m_executeScriptsTaskFactory(CancellableTaskFactory::create(this, &ScriptRunner::executeScripts))
|
| {
|
| ASSERT(document);
|
| -#if ENABLE(LAZY_SWEEPING) && defined(ADDRESS_SANITIZER)
|
| - m_executeScriptsTaskFactory.setUnpoisonBeforeUpdate();
|
| -#endif
|
| }
|
|
|
| ScriptRunner::~ScriptRunner()
|
| @@ -92,7 +82,7 @@ void ScriptRunner::queueScriptForExecution(ScriptLoader* scriptLoader, Execution
|
|
|
| void ScriptRunner::suspend()
|
| {
|
| - m_executeScriptsTaskFactory.cancel();
|
| + m_executeScriptsTaskFactory->cancel();
|
| }
|
|
|
| void ScriptRunner::resume()
|
| @@ -224,10 +214,10 @@ bool ScriptRunner::yieldForHighPriorityWork()
|
|
|
| void ScriptRunner::postTaskIfOneIsNotAlreadyInFlight()
|
| {
|
| - if (m_executeScriptsTaskFactory.isPending())
|
| + if (m_executeScriptsTaskFactory->isPending())
|
| return;
|
|
|
| - Platform::current()->currentThread()->scheduler()->loadingTaskRunner()->postTask(FROM_HERE, m_executeScriptsTaskFactory.cancelAndCreate());
|
| + Platform::current()->currentThread()->scheduler()->loadingTaskRunner()->postTask(FROM_HERE, m_executeScriptsTaskFactory->cancelAndCreate());
|
| }
|
|
|
| DEFINE_TRACE(ScriptRunner)
|
| @@ -240,4 +230,4 @@ DEFINE_TRACE(ScriptRunner)
|
| #endif
|
| }
|
|
|
| -}
|
| +} // namespace blink
|
|
|