diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc index d640d545e78c8..c70cf04088f2c 100644 --- net/test/embedded_test_server/embedded_test_server.cc +++ net/test/embedded_test_server/embedded_test_server.cc @@ -1091,7 +1091,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) { if (!base::CurrentThread::Get()) temporary_loop = std::make_unique(); - base::RunLoop run_loop; + base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed); if (!io_thread_->task_runner()->PostTaskAndReply( FROM_HERE, std::move(closure), run_loop.QuitClosure())) { return false; @@ -1118,7 +1118,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult( if (!base::CurrentThread::Get()) temporary_loop = std::make_unique(); - base::RunLoop run_loop; + base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed); bool task_result = false; if (!io_thread_->task_runner()->PostTaskAndReplyWithResult( FROM_HERE, std::move(task),