Commit 715567d4 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate MessageLoop::ScopedNestableTaskAllower to...

Migrate MessageLoop::ScopedNestableTaskAllower to RunLoop::Type::kNestableTasksAllowed in /content/test/renderer_audio_output_stream_factory_context_impl_unittest.cc

This pass focuses on ML::SNTA in same scope as an anonymous RunLoop().RunUntilIdle()
Scripted via a small tweak of https://bugs.chromium.org/p/chromium/issues/detail?id=781352#c1
which focused on RunLoops with a variable name.

The script should have replaced a MessageLoop::ScopedNestableTaskAllower
in the same scope as a RunLoop with a RunLoop of
Type::kNestableTasksAllowed. If there was a comment above the
MessageLoop::ScopedNestableTaskAllower, it should have been moved
alongside the augmented RunLoop.

Includes should have been stripped if the was the last usage of message_loop.h
in that file.

Please CQ if LGTY

This CL was uploaded by git cl split.

R=miu@chromium.org

Bug: 781352
Change-Id: Icf40891ff0b5b9ef22e588e65104ff70b55b2047
Reviewed-on: https://chromium-review.googlesource.com/995919
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: default avatarYuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548594}
parent b1d6cfe1
......@@ -9,7 +9,6 @@
#include "base/bind.h"
#include "base/memory/shared_memory.h"
#include "base/memory/shared_memory_handle.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/sync_socket.h"
......@@ -82,11 +81,7 @@ void SyncWithAllThreads() {
// New tasks might be posted while we are syncing, but in every iteration at
// least one task will be run. 20 iterations should be enough for our code.
for (int i = 0; i < 20; ++i) {
{
base::MessageLoop::ScopedNestableTaskAllower allower(
base::MessageLoop::current());
base::RunLoop().RunUntilIdle();
}
base::RunLoop(base::RunLoop::Type::kNestableTasksAllowed).RunUntilIdle();
SyncWith(BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
SyncWith(media::AudioManager::Get()->GetWorkerTaskRunner());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment