Commit 30e29437 authored by Daniel Cheng's avatar Daniel Cheng Committed by Commit Bot

SequenceBound: migrate from Post() to AsyncCall() in tracing classes.

Bug: 1140588
Change-Id: Ib4429dd024d2571d574dcbd63d84dca6ec90e10a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2488082Reviewed-by: default avatarEric Seckler <eseckler@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819518}
parent 576387b5
......@@ -166,8 +166,8 @@ void PerfettoFileTracer::ReadBuffers() {
},
base::Unretained(this), has_been_disabled_));
background_drainer_.Post(FROM_HERE, &BackgroundDrainer::StartDrain,
std::move(data_pipe.consumer_handle));
background_drainer_.AsyncCall(&BackgroundDrainer::StartDrain)
.WithArgs(std::move(data_pipe.consumer_handle));
}
void PerfettoFileTracer::OnTracingSessionEnded() {
......
......@@ -495,8 +495,8 @@ void ConsumerHost::TracingSession::OnJSONTraceData(std::string json,
bool has_more) {
auto slice = std::make_unique<StreamWriter::Slice>();
slice->swap(json);
read_buffers_stream_writer_.Post(FROM_HERE, &StreamWriter::WriteToStream,
std::move(slice), has_more);
read_buffers_stream_writer_.AsyncCall(&StreamWriter::WriteToStream)
.WithArgs(std::move(slice), has_more);
if (!has_more) {
read_buffers_stream_writer_.Reset();
......@@ -559,8 +559,8 @@ void ConsumerHost::TracingSession::OnTraceData(
chunk->append(static_cast<const char*>(slice.start), slice.size);
}
}
read_buffers_stream_writer_.Post(FROM_HERE, &StreamWriter::WriteToStream,
std::move(chunk), has_more);
read_buffers_stream_writer_.AsyncCall(&StreamWriter::WriteToStream)
.WithArgs(std::move(chunk), has_more);
if (!has_more) {
read_buffers_stream_writer_.Reset();
}
......
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