for TaskQueueTest.
This suit is instantiated in the different binary targets by design.
Bug: None
Change-Id: I99a38e2461ee9bd06dfe68758490afe75c2475ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176750
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31476}
This reverts commit 28685dc08c.
Reason for revert: Speculative reland after looking into downstream
failures. It's possible that carryover state from unrelated tests
running in parallel was causing failures.
Original change's description:
> Revert "Make sure that "current" rtc::Thread instances are always current for TaskQueueBase."
>
> This reverts commit 46b3bc6c24.
>
> Reason for revert: Speculative revert. Breaks downstream project
>
> Original change's description:
> > Make sure that "current" rtc::Thread instances are always current for TaskQueueBase.
> >
> > This is a necessary part of fulfilling the TaskQueueBase
> > interface. If a thread does not register as the current TQ, yet offers
> > the TQ interface, TQ 'current' checks will not work as expected and
> > code that relies them (TaskQueueBase::Current() and IsCurrent())
> > will run in unexpected ways.
> >
> > Bug: webrtc:11572
> > Change-Id: Iab747bc474e74e6ce4f9e914cfd5b0578b19d19c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175080
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31254}
>
> TBR=mbonadei@webrtc.org,tommi@webrtc.org
>
> Change-Id: I69ff3355f0ec447b25604bd95fdacbdb4d4f3f27
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:11572
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175104
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31259}
TBR=mbonadei@webrtc.org,tommi@webrtc.org,titovartem@webrtc.org
# Not skipping CQ checks because this is a reland.
Bug: webrtc:11572
Change-Id: I00c82d99af8e05851769e09cb682b5b73895a6f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175133
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31273}
This reverts commit 46b3bc6c24.
Reason for revert: Speculative revert. Breaks downstream project
Original change's description:
> Make sure that "current" rtc::Thread instances are always current for TaskQueueBase.
>
> This is a necessary part of fulfilling the TaskQueueBase
> interface. If a thread does not register as the current TQ, yet offers
> the TQ interface, TQ 'current' checks will not work as expected and
> code that relies them (TaskQueueBase::Current() and IsCurrent())
> will run in unexpected ways.
>
> Bug: webrtc:11572
> Change-Id: Iab747bc474e74e6ce4f9e914cfd5b0578b19d19c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175080
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31254}
TBR=mbonadei@webrtc.org,tommi@webrtc.org
Change-Id: I69ff3355f0ec447b25604bd95fdacbdb4d4f3f27
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11572
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175104
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31259}
This is a necessary part of fulfilling the TaskQueueBase
interface. If a thread does not register as the current TQ, yet offers
the TQ interface, TQ 'current' checks will not work as expected and
code that relies them (TaskQueueBase::Current() and IsCurrent())
will run in unexpected ways.
Bug: webrtc:11572
Change-Id: Iab747bc474e74e6ce4f9e914cfd5b0578b19d19c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175080
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31254}
`gn format` recently [1] changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.
Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.
CL generated with:
$ git ls-files | grep BUILD.gn | xargs gn format
$ gn format build_overrides/build.gni
$ gn format build_overrides/gtest.gni
$ gn format modules/audio_coding/audio_coding.gni
$ gn format webrtc.gni
$ gn format .gn
Plus a few manual changes to add exceptions for
"public_deps" (after changing these lines the presubmit
started to complain).
[1] - https://gn-review.googlesource.com/c/gn/+/6860
Bug: webrtc:11302
Change-Id: Iac29d23c1618ebef925c972e2891cd9f4e8cd613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166882
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30334}
This is a reland of 53e157d25c
The issue has been fixed in
https://chromium-review.googlesource.com/c/chromium/src/+/1917204.
Original change's description:
> Force Chromium deps on the WebRTC component.
>
> This CL adds a visibility check to the rtc_* GN templates in order
> to force Chromium to depend only on publicly visible targets from
> //third_party/webrtc_overrides and not from //third_party/webrtc.
>
> This is required in order to ensure that the Chromium's component
> builds continues to work correctly without introducing direct
> dependency paths on WebRTC that would statically link it in multiple
> shared libraries.
>
> Bug: webrtc:9419
> Change-Id: Ib89f4fc571512f99678ee4f61696b316374346d9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154344
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29806}
TBR: kwiberg@webrtc.org
Bug: webrtc:9419
Change-Id: I7123d1b44ddbc23b11d9fa25aa39aa420359e33d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159922
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29816}
This reverts commit 53e157d25c.
Reason for revert: Breaks Chromium iOS FYI bots.
https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/5088
Original change's description:
> Force Chromium deps on the WebRTC component.
>
> This CL adds a visibility check to the rtc_* GN templates in order
> to force Chromium to depend only on publicly visible targets from
> //third_party/webrtc_overrides and not from //third_party/webrtc.
>
> This is required in order to ensure that the Chromium's component
> builds continues to work correctly without introducing direct
> dependency paths on WebRTC that would statically link it in multiple
> shared libraries.
>
> Bug: webrtc:9419
> Change-Id: Ib89f4fc571512f99678ee4f61696b316374346d9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154344
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29806}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,dpranke@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
TBR: kwiberg@webrtc.org
Bug: webrtc:9419
Change-Id: Id4d906910d569a3e5db3afef8c03672fba6dad81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159921
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29813}
This CL adds a visibility check to the rtc_* GN templates in order
to force Chromium to depend only on publicly visible targets from
//third_party/webrtc_overrides and not from //third_party/webrtc.
This is required in order to ensure that the Chromium's component
builds continues to work correctly without introducing direct
dependency paths on WebRTC that would statically link it in multiple
shared libraries.
Bug: webrtc:9419
Change-Id: Ib89f4fc571512f99678ee4f61696b316374346d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154344
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29806}
This CL adds a dependecy on rtc_base/system:rtc_export to rtc_event but
only when built as part of Chromium (since rtc::Event should not be
used outside of WebRTC).
It also adds other missing RTC_EXPORTS.
Bug: webrtc:9419
Change-Id: Ib338004a5404a6b3c7929e146c29ad42572632cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159692
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29781}
Chromium tests depend on api/task_queue:task_queue_test but it
cannot be added to the WebRTC component in Chromium (which is not
testonly).
A possible solution is to make api/task_queue:task_queue_test
depend on the WebRTC component which lives in Chromium only
when `build_with_chromium=true`.
Bug: webrtc:9419
Change-Id: I1cbe1fb97f21ef7a201d09d2f0f729104d01ed90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157427
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29578}
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).
Source sets always pass all the object files to the linker.
On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.
See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set
Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
from 2x expected time to 10x.
To decrease flakiness for task queue implemntations that destroy tasks
after destruction of the task queue.
Bug: chromium:1000531
Change-Id: Ieb37ff782ead585e0aa2c84472e3993107c5c072
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152830
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29204}
Users of webrtc generally should be able to choose own task queue implementation.
Poison avoids accidental dependency of a low level component on the default implementation
Android and ios apis are still de-facto forced to use the default implementation.
Bug: webrtc:10284
Change-Id: I67ecf2317f43ee32b0c9e8a6e69f1e0987cf1914
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144786
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28524}
recent changed decreased timeout from forever to 1s which is not enough on some platforms
Increase timeout to forever for posting 65k tasks.
Also increase timeout for eventual destruction of the tasks to reduce change it would flake.
Bug: chromium:972917
Change-Id: I4948d49c1514833ab190856fdd25a47a5bad91eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141410
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28235}
avoid waiting while executing a Task to discourage blocking.
fix accessing tasks_clean_up counter since after TaskQueue is destroyed,
it doesn't guarantee sequential execution of the destructors, nor
that all pending tasks are destroyed at that moment.
Instead verify that all posted tasks will be destroyed eventually.
Bug: None
Change-Id: I4cfc97ac0787fe2d0b9d2f0d712a37ae0ca9e1aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140288
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28208}
Chromium requires that all code that waits on a sync primitive be
annotated with ScopedAllowBaseSyncPrimitives(ForTesting). Webrtc
already imports ScopedAllowBaseSyncPrimitives.
ScopedAllowBaseSyncPrimitivesForTesting is equivalent but can only
be used in tests and doesn't required adding a friend declaration to
thread_restrictions.h.
Previously, the code that is annotated with
ScopedAllowBaseSyncPrimitivesForTesting in this CL didn't fail because
it ran on a TaskRunner annotated with the deprecated
WithBaseSyncPrimitives() trait (cf.
https://cs.chromium.org/chromium/src/content/renderer/media/webrtc/task_queue_factory_unittest.cc?l=23&rcl=362f3723ac358d932ea2e3af65512a1243697a31).
Change-Id: Id7cfa2ea108870de86dc887458ae783c807791cc
Bug: chromium:889029
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128823
Commit-Queue: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27339}
That will avoid linkage error of targets that depend
on global_task_queue_factory without depending on rtc_task_queue
Bug: webrtc:10191
Change-Id: Ia67ea0a3abb715e28160e4e376133cc0309b14e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126621
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27053}
Ignore rtc_link_task_queue_impl flag,
instead use build_with_chromium for custom chromium implementation injection
This changes TaskQueue implementation used in webrtc fuzzers in chromium:
from own webrtc implementation to chromium's.
Bug: webrtc:10191
Change-Id: I63be28b680ae8ea8ee1dbf0c699263c392ce29d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125196
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26977}
to make it usable without need to depend on rtc_task_queue
Bug: webrtc:10191
Change-Id: I2ae1445cf5d498aa6928d66b6823f2f940987767
Reviewed-on: https://webrtc-review.googlesource.com/c/125084
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26942}
The new parameter simplify TaskQueueFactory lifetime and
allows insertion of per TestCase state
Bug: webrtc:10191
Change-Id: If4948df2756580957052b2b333b5c12cf4914d55
Reviewed-on: https://webrtc-review.googlesource.com/c/121648
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26583}
The set of tests is a copy of rtc_base/task_queue_unittests excluding tests
that verify rtc::NewClosure rather than task queue implementation itself.
Bug: webrtc:10191
Change-Id: I94e962ad63ff6510c43a97ef0cd4da7d08f25538
Reviewed-on: https://webrtc-review.googlesource.com/c/118445
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26369}
This cl allows to overwrite TaskQueue implementation
by depending on and setting the global task queue factory.
Bug: webrtc:10191
Change-Id: I69ceb139d00078d3be90eeb4e240758b88829c20
Reviewed-on: https://webrtc-review.googlesource.com/c/118060
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26345}