Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_perftest.cc |
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_perftest.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_perftest.cc |
index 28c4d48a7d7d028912ab5a6cbd6ef73d002f134f..b059acc0d8fd45a64df64823cdd2ec519e763d7d 100644 |
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_perftest.cc |
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_perftest.cc |
@@ -38,11 +38,9 @@ class TaskQueueManagerPerfTest : public testing::Test { |
void Initialize(size_t num_queues) { |
num_queues_ = num_queues; |
- message_loop_.reset(new base::MessageLoop()); |
- run_loop_.reset(new base::RunLoop()); |
manager_ = base::MakeUnique<TaskQueueManager>( |
TaskQueueManagerDelegateForTest::Create( |
- message_loop_->task_runner(), |
+ base::MessageLoop::current()->task_runner(), |
base::WrapUnique(new base::DefaultTickClock())), |
"fake.category", "fake.category", "fake.category.debug"); |
manager_->AddTaskTimeObserver(&test_task_time_observer_); |
@@ -98,6 +96,7 @@ class TaskQueueManagerPerfTest : public testing::Test { |
unsigned long long num_iterations = 0; |
do { |
test_task.Run(); |
+ run_loop_.reset(new base::RunLoop()); |
run_loop_->Run(); |
now = base::ThreadTicks::Now(); |
num_iterations++; |
@@ -114,7 +113,6 @@ class TaskQueueManagerPerfTest : public testing::Test { |
unsigned int num_tasks_to_post_; |
unsigned int num_tasks_to_run_; |
std::unique_ptr<TaskQueueManager> manager_; |
- std::unique_ptr<base::MessageLoop> message_loop_; |
std::unique_ptr<base::RunLoop> run_loop_; |
std::vector<scoped_refptr<base::SingleThreadTaskRunner>> queues_; |
// TODO(alexclarke): parameterize so we can measure with and without a |