Index: Source/core/dom/ExecutionContextTask.h |
diff --git a/Source/core/dom/ExecutionContextTask.h b/Source/core/dom/ExecutionContextTask.h |
index 60507a20abf84940a56d8705e36e86e1fe655f85..ba33d6e0b4773eed548ae74ebf5dddf14026f261 100644 |
--- a/Source/core/dom/ExecutionContextTask.h |
+++ b/Source/core/dom/ExecutionContextTask.h |
@@ -54,15 +54,15 @@ public: |
// Do not use |create| other than in createCrossThreadTask and |
// createSameThreadTask. |
// See http://crbug.com/390851 |
- static PassOwnPtr<CallClosureTask> create(const Closure& closure) |
+ static PassOwnPtr<CallClosureTask> create(PassOwnPtr<Closure> closure) |
{ |
return adoptPtr(new CallClosureTask(closure)); |
} |
- virtual void performTask(ExecutionContext*) override { m_closure(); } |
+ virtual void performTask(ExecutionContext*) override { (*m_closure)(); } |
private: |
- explicit CallClosureTask(const Closure& closure) : m_closure(closure) { } |
- Closure m_closure; |
+ explicit CallClosureTask(PassOwnPtr<Closure> closure) : m_closure(closure) { } |
+ OwnPtr<Closure> m_closure; |
}; |
// Create tasks passed within a single thread. |