Don't use base::WorkerPool in the asset_bundle app.

WorkerPools can't be shut down, which means that the app's .so can't be
unloaded (which is bad for single process mode, and which is probably
why the asset bundle tests are flakily crashing on the try bots).

So use a SequencedWorkerPool instead (even though we don't care about
sequencing).

R=eseidel@chromium.org, kulakowski@chromium.org, abarth@chromium.org
BUG=Fixes #268

Review URL: https://codereview.chromium.org/1206673006.
This commit is contained in:
Viet-Trung Luu 2015-06-24 15:24:01 -07:00
parent 27936d2543
commit 29ae65d27f

View File

@ -4,6 +4,7 @@
#include "sky/shell/ui/internals.h"
#include "base/threading/worker_pool.h"
#include "mojo/public/cpp/application/connect.h"
#include "mojo/public/cpp/bindings/array.h"
#include "services/asset_bundle/asset_unpacker_impl.h"
@ -107,7 +108,8 @@ Internals::~Internals() {
void Internals::Create(
mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<mojo::asset_bundle::AssetUnpacker> request) {
new mojo::asset_bundle::AssetUnpackerImpl(request.Pass());
new mojo::asset_bundle::AssetUnpackerImpl(
request.Pass(), base::WorkerPool::GetTaskRunner(true));
}
mojo::Handle Internals::TakeServicesProvidedByEmbedder() {