| Index: Source/platform/scheduler/CancellableTaskFactory.h
|
| diff --git a/Source/platform/scheduler/CancellableTaskFactory.h b/Source/platform/scheduler/CancellableTaskFactory.h
|
| index 932963a6d452b8496c09f94c4e29110396474339..dc378d3a4927a7e3bfa55892313a1d67e2f64704 100644
|
| --- a/Source/platform/scheduler/CancellableTaskFactory.h
|
| +++ b/Source/platform/scheduler/CancellableTaskFactory.h
|
| @@ -48,13 +48,6 @@ public:
|
| return adoptPtr(new CancellableTaskFactory(WTF::bind(method, thisObject)));
|
| }
|
|
|
| - // Only intended used by unit tests. Please use leak safe create() factory method, if possible.
|
| - explicit CancellableTaskFactory(PassOwnPtr<Closure> closure)
|
| - : m_closure(closure)
|
| - , m_weakPtrFactory(this)
|
| - {
|
| - }
|
| -
|
| bool isPending() const
|
| {
|
| return m_weakPtrFactory.hasWeakPtrs();
|
| @@ -66,6 +59,15 @@ public:
|
| // ownership of the task. Creating a new task cancels any previous ones.
|
| WebTaskRunner::Task* cancelAndCreate();
|
|
|
| +protected:
|
| + // Only intended used by unit tests wanting to stack allocate and/or pass in a closure value.
|
| + // Please use the create() factory method elsewhere.
|
| + explicit CancellableTaskFactory(PassOwnPtr<Closure> closure)
|
| + : m_closure(closure)
|
| + , m_weakPtrFactory(this)
|
| + {
|
| + }
|
| +
|
| private:
|
| class CancellableTask : public WebTaskRunner::Task {
|
| WTF_MAKE_NONCOPYABLE(CancellableTask);
|
|
|