| Index: third_party/WebKit/Source/platform/scheduler/CancellableTaskFactoryTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactoryTest.cpp b/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactoryTest.cpp
|
| index 905ae12655c3851f25df9111ed9d9cc62726209d..294f50d9d6a88d84bf6d90f983d464887413e211 100644
|
| --- a/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactoryTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactoryTest.cpp
|
| @@ -99,7 +99,7 @@ void AddOne(int* ptr)
|
| TEST_F(CancellableTaskFactoryTest, Run_ClosureIsExecuted)
|
| {
|
| int executionCount = 0;
|
| - TestCancellableTaskFactory factory(WTF::bind(&AddOne, &executionCount));
|
| + TestCancellableTaskFactory factory(WTF::bind(&AddOne, unretained(&executionCount)));
|
| OwnPtr<WebTaskRunner::Task> task = adoptPtr(factory.cancelAndCreate());
|
| task->run();
|
|
|
| @@ -109,7 +109,7 @@ TEST_F(CancellableTaskFactoryTest, Run_ClosureIsExecuted)
|
| TEST_F(CancellableTaskFactoryTest, Run_ClosureIsExecutedOnlyOnce)
|
| {
|
| int executionCount = 0;
|
| - TestCancellableTaskFactory factory(WTF::bind(&AddOne, &executionCount));
|
| + TestCancellableTaskFactory factory(WTF::bind(&AddOne, unretained(&executionCount)));
|
| OwnPtr<WebTaskRunner::Task> task = adoptPtr(factory.cancelAndCreate());
|
| task->run();
|
| task->run();
|
| @@ -124,7 +124,7 @@ TEST_F(CancellableTaskFactoryTest, Run_FactoryDestructionPreventsExecution)
|
| int executionCount = 0;
|
| OwnPtr<WebTaskRunner::Task> task;
|
| {
|
| - TestCancellableTaskFactory factory(WTF::bind(&AddOne, &executionCount));
|
| + TestCancellableTaskFactory factory(WTF::bind(&AddOne, unretained(&executionCount)));
|
| task = adoptPtr(factory.cancelAndCreate());
|
| }
|
| task->run();
|
| @@ -135,7 +135,7 @@ TEST_F(CancellableTaskFactoryTest, Run_FactoryDestructionPreventsExecution)
|
| TEST_F(CancellableTaskFactoryTest, Run_TasksInSequence)
|
| {
|
| int executionCount = 0;
|
| - TestCancellableTaskFactory factory(WTF::bind(&AddOne, &executionCount));
|
| + TestCancellableTaskFactory factory(WTF::bind(&AddOne, unretained(&executionCount)));
|
|
|
| OwnPtr<WebTaskRunner::Task> taskA = adoptPtr(factory.cancelAndCreate());
|
| taskA->run();
|
| @@ -153,7 +153,7 @@ TEST_F(CancellableTaskFactoryTest, Run_TasksInSequence)
|
| TEST_F(CancellableTaskFactoryTest, Cancel)
|
| {
|
| int executionCount = 0;
|
| - TestCancellableTaskFactory factory(WTF::bind(&AddOne, &executionCount));
|
| + TestCancellableTaskFactory factory(WTF::bind(&AddOne, unretained(&executionCount)));
|
| OwnPtr<WebTaskRunner::Task> task = adoptPtr(factory.cancelAndCreate());
|
| factory.cancel();
|
| task->run();
|
| @@ -164,7 +164,7 @@ TEST_F(CancellableTaskFactoryTest, Cancel)
|
| TEST_F(CancellableTaskFactoryTest, CreatingANewTaskCancelsPreviousOnes)
|
| {
|
| int executionCount = 0;
|
| - TestCancellableTaskFactory factory(WTF::bind(&AddOne, &executionCount));
|
| + TestCancellableTaskFactory factory(WTF::bind(&AddOne, unretained(&executionCount)));
|
|
|
| OwnPtr<WebTaskRunner::Task> taskA = adoptPtr(factory.cancelAndCreate());
|
| OwnPtr<WebTaskRunner::Task> taskB = adoptPtr(factory.cancelAndCreate());
|
|
|