Commit 87c9a265 authored by Stephen Nusko's avatar Stephen Nusko Committed by Commit Bot

Remove the workaround to perfetto calling CommitData on the wrong sequence.

The fix was submitted in
https://android-review.googlesource.com/c/platform/external/perfetto/+/874695

So we no longer need to special case this instead we can just
delegate the call directly.

Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=839074
Change-Id: Ie6d6ee8d94b00f73b59dd95a90d2c29dd3f9a383
Reviewed-on: https://chromium-review.googlesource.com/c/1451942
Commit-Queue: Stephen Nusko <nuskos@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Auto-Submit: Stephen Nusko <nuskos@chromium.org>
Reviewed-by: default avatarEric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629999}
parent 2cfd5933
......@@ -241,19 +241,7 @@ void ProducerClient::NotifyDataSourceStopped(
void ProducerClient::CommitData(const perfetto::CommitDataRequest& commit,
CommitDataCallback callback) {
// TODO(oysteine): Remove the PostTask once Perfetto is fixed to always call
// CommitData on its provided TaskRunner, right now it'll call it on whatever
// thread is requesting a new chunk when the SharedMemoryBuffer is full. Until
// then this is technically not threadsafe on shutdown (when the
// ProducerClient gets destroyed) but should be okay while the Perfetto
// integration is behind a flag.
if (GetTaskRunner()->RunsTasksInCurrentSequence()) {
producer_host_->CommitData(commit);
} else {
GetTaskRunner()->PostTask(
FROM_HERE, base::BindOnce(&ProducerClient::CommitDataOnSequence,
base::Unretained(this), commit));
}
producer_host_->CommitData(commit);
}
void ProducerClient::CommitDataOnSequence(
......
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