Skip to content

Commit 2fa39bd

Browse files
Markus HandellWebRTC LUCI CQ
authored andcommitted
Implement support for Chrome task origin tracing. #3.8/4
This CL forwards TaskQueue locations to the contained task queue. Bug: chromium:1416199 Change-Id: I989ae445a67991bf5a857407135dbe8bacbd3c55 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295622 Reviewed-by: Harald Alvestrand <[email protected]> Commit-Queue: Markus Handell <[email protected]> Cr-Commit-Position: refs/heads/main@{#39446}
1 parent 18c869b commit 2fa39bd

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

rtc_base/task_queue.h

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,22 @@ class RTC_LOCKABLE RTC_EXPORT TaskQueue {
9090
// Returns non-owning pointer to the task queue implementation.
9191
webrtc::TaskQueueBase* Get() { return impl_; }
9292

93-
void PostTask(absl::AnyInvocable<void() &&> task) {
94-
impl_->PostTask(std::move(task));
93+
void PostTask(
94+
absl::AnyInvocable<void() &&> task,
95+
const webrtc::Location& location = webrtc::Location::Current()) {
96+
impl_->PostTask(std::move(task), location);
9597
}
96-
void PostDelayedTask(absl::AnyInvocable<void() &&> task,
97-
webrtc::TimeDelta delay) {
98-
impl_->PostDelayedTask(std::move(task), delay);
98+
void PostDelayedTask(
99+
absl::AnyInvocable<void() &&> task,
100+
webrtc::TimeDelta delay,
101+
const webrtc::Location& location = webrtc::Location::Current()) {
102+
impl_->PostDelayedTask(std::move(task), delay, location);
99103
}
100-
void PostDelayedHighPrecisionTask(absl::AnyInvocable<void() &&> task,
101-
webrtc::TimeDelta delay) {
102-
impl_->PostDelayedHighPrecisionTask(std::move(task), delay);
104+
void PostDelayedHighPrecisionTask(
105+
absl::AnyInvocable<void() &&> task,
106+
webrtc::TimeDelta delay,
107+
const webrtc::Location& location = webrtc::Location::Current()) {
108+
impl_->PostDelayedHighPrecisionTask(std::move(task), delay, location);
103109
}
104110

105111
private:

0 commit comments

Comments
 (0)