Commit graph

45 commits

Author SHA1 Message Date
Danil Chapovalov
5ad16a50fc suppress 'Paramaterized test suite never instantiated' warning
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}
2020-06-09 13:31:49 +00:00
Mirko Bonadei
2dcf348011 Use absl_deps in order to preapre to the Abseil component build release.
Bug: webrtc:1046390
Change-Id: Ia35545599de23b1a2c2d8be2d53469af7ac16f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176502
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31463}
2020-06-08 12:59:40 +00:00
Tommi
6866dc7806 Reland "Make sure that "current" rtc::Thread instances are always current for TaskQueueBase."
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}
2020-05-15 10:20:03 +00:00
Artem Titov
28685dc08c 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}
2020-05-14 13:55:22 +00:00
Tommi
46b3bc6c24 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}
2020-05-14 12:40:42 +00:00
Mirko Bonadei
ccbe95fd8a Reformat GN files.
`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}
2020-01-21 12:13:11 +00:00
Mirko Bonadei
92dd35d035 Reland "Force Chromium deps on the WebRTC component."
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}
2019-11-18 12:16:43 +00:00
Mirko Bonadei
2419dc9cfc Revert "Force Chromium deps on the WebRTC component."
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}
2019-11-18 08:11:30 +00:00
Mirko Bonadei
53e157d25c 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}
2019-11-15 16:36:28 +00:00
Mirko Bonadei
d4002a733d RTC_EXPORT missing symbols for Chromium's component build.
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}
2019-11-12 21:50:01 +00:00
Mirko Bonadei
c04792ebef Component Build support for api/task_queue:task_queue_test.
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}
2019-10-22 23:21:06 +00:00
Mirko Bonadei
86d053c2db Use source_sets in component builds and static_library in release builds.
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}
2019-10-17 21:17:18 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Danil Chapovalov
2c6ea52369 In TaskQueueTest::PostDelayedAfterDesctruct increase timeout
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}
2019-09-17 09:36:47 +00:00
Danil Chapovalov
41300af876 Poison default task queue factory
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}
2019-07-10 14:08:20 +00:00
Danil Chapovalov
b249c54209 Delete GlobalTaskQueueFactory as now unused
Bug: webrtc:10284
Change-Id: I80fd75b0bd306a26e0c022047551587ee5fd08cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144781
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28516}
2019-07-09 14:45:47 +00:00
Danil Chapovalov
95e0a607f6 Increase TaskQueueTest.PostALot timeouts
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}
2019-06-11 14:42:18 +00:00
Danil Chapovalov
f504dd305d Rewrite TaskQueueTest.PostALot
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}
2019-06-10 11:00:44 +00:00
François Doray
8ea977d2fd Add ScopedAllowBaseSyncPrimitivesForTesting to Webrtc.
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}
2019-03-28 13:07:33 +00:00
Danil Chapovalov
4f779c6aec Remove legacy empty task_queue BUILD targets and build arg
Now that they are unused

Bug: webrtc:10191
Change-Id: Id5f1b70ed8e084555ca809fef2a75359266f2ca1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126980
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27070}
2019-03-12 10:06:04 +00:00
Danil Chapovalov
ad89528051 Reland "Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current"
This reverts commit 42d8c93ec3.

Reason for revert: Got Aliby for FEC test flakes

Original change's description:
> Revert "Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current"
> 
> This reverts commit 304e9d2df3.
> 
> Reason for revert: Breaks downstream projects.
> Seems to make VideoSendStreamTest.SupportsFlexfecSimulcastVp8 flaky.
> 
> Original change's description:
> > Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current
> > 
> > Bug: webrtc:10191
> > Change-Id: I506cc50a90c73a6a4f6a3de36de0999cca72f5ba
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126230
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27035}
> 
> TBR=danilchap@webrtc.org,kwiberg@webrtc.org
> 
> Change-Id: If98324f88e4b3d18bf2fe33597dfb9711867c243
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10191
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126484
> Reviewed-by: Yves Gerey <yvesg@webrtc.org>
> Commit-Queue: Yves Gerey <yvesg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27041}

TBR=danilchap@webrtc.org,kwiberg@webrtc.org,yvesg@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10191
Change-Id: Id87a17ae415142b8e0b11ba03ae7bad84a473fb0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126720
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27056}
2019-03-11 12:32:49 +00:00
Danil Chapovalov
effdfe2014 Move dependency on chromium DefaultTaskQueueFactory
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}
2019-03-11 11:28:28 +00:00
Yves Gerey
42d8c93ec3 Revert "Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current"
This reverts commit 304e9d2df3.

Reason for revert: Breaks downstream projects.
Seems to make VideoSendStreamTest.SupportsFlexfecSimulcastVp8 flaky.

Original change's description:
> Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current
> 
> Bug: webrtc:10191
> Change-Id: I506cc50a90c73a6a4f6a3de36de0999cca72f5ba
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126230
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27035}

TBR=danilchap@webrtc.org,kwiberg@webrtc.org

Change-Id: If98324f88e4b3d18bf2fe33597dfb9711867c243
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126484
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27041}
2019-03-08 16:14:54 +00:00
Danil Chapovalov
304e9d2df3 Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current
Bug: webrtc:10191
Change-Id: I506cc50a90c73a6a4f6a3de36de0999cca72f5ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126230
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27035}
2019-03-08 13:17:46 +00:00
Danil Chapovalov
4423c36448 Migrate RepeatingTask to take raw pointer to TaskQueueBase instead of TaskQueue
In particular replace call rtc::TaskQueue::Current with TaskQueueBase::Current

Bug: webrtc:10191
Change-Id: I19d42a716d27f0aba087dc70ac65b4ee6249408f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125085
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27005}
2019-03-06 18:44:35 +00:00
Danil Chapovalov
07a4f2b267 Merge rtc_task_queue(_api|_impl)? build targets into one
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}
2019-03-05 20:13:38 +00:00
Danil Chapovalov
3b548ddb1c Move rtc::NewClosure into own build target as ToQueuedTask
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}
2019-03-04 09:00:38 +00:00
Danil Chapovalov
f3280e99b0 Create conversions between webrtc::TaskQueueBase and rtc::TaskQueue
Bug: webrtc:10191
Change-Id: Ia6642081ac758e31c14780bdd83dbc88279cce6d
Reviewed-on: https://webrtc-review.googlesource.com/c/124826
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26890}
2019-02-28 10:36:07 +00:00
Danil Chapovalov
d00405f89a Drop support for link-time injection of the rtc::TaskQueue::Impl
Bug: webrtc:10191
Change-Id: I1b975e8a2230dd45828a4e7f4d5a86f61164445a
Reviewed-on: https://webrtc-review.googlesource.com/c/124121
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26870}
2019-02-27 10:07:34 +00:00
Danil Chapovalov
2684ab3db0 Test default TaskQueue implementation via TaskQueueBase interface
Bug: webrtc:10191
Change-Id: I97a73311790e8ceac00d5575dd124ad8ad76503f
Reviewed-on: https://webrtc-review.googlesource.com/c/124400
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26853}
2019-02-26 14:01:45 +00:00
Mirko Bonadei
a9cfa476fe Revert "Delete rtc_task_queue_impl build target"
This reverts commit 56973e627e.

Reason for revert: Breaks libfuzzer-asan Chromium trybots:
E.g.
https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-libfuzzer-asan-rel/112220

Original change's description:
> Delete rtc_task_queue_impl build target
> 
> Bug: webrtc:10191
> Change-Id: I2ba660c403919708d28b5f5f2bdcffdb1e4ee486
> Reviewed-on: https://webrtc-review.googlesource.com/c/124040
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26826}

TBR=danilchap@webrtc.org,mbonadei@webrtc.org

Change-Id: Ic04fc725e0a9cba84584ecf043b39b9d68f69bc7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10191
Reviewed-on: https://webrtc-review.googlesource.com/c/124124
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26828}
2019-02-24 09:17:31 +00:00
Danil Chapovalov
56973e627e Delete rtc_task_queue_impl build target
Bug: webrtc:10191
Change-Id: I2ba660c403919708d28b5f5f2bdcffdb1e4ee486
Reviewed-on: https://webrtc-review.googlesource.com/c/124040
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26826}
2019-02-23 13:03:15 +00:00
Danil Chapovalov
fa52efadf1 Migrate stdlib task queue to TaskQueueBase interface
Bug: webrtc:10191
Change-Id: I16e13b69dce7cafa545977e9ac253b6e57312690
Reviewed-on: https://webrtc-review.googlesource.com/c/123760
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26796}
2019-02-21 14:36:07 +00:00
Danil Chapovalov
826f2e7f34 Migrate win task queue to TaskQueueBase interface
Bug: webrtc:10191
Change-Id: I498c4187883206d7082d9f7323575f087e041370
Reviewed-on: https://webrtc-review.googlesource.com/c/123485
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26791}
2019-02-21 09:33:42 +00:00
Danil Chapovalov
47cf5eaca4 Migrate gcd task queue implementation to TaskQueueBase interface
Bug: webrtc:10191
Change-Id: If15138f97445484668d3e42f3a35875521c38545
Reviewed-on: https://webrtc-review.googlesource.com/c/122501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26782}
2019-02-20 17:08:53 +00:00
Danil Chapovalov
eb1752412a Migrate libevent task queue implementation to TaskQueueBase interface
Bug: webrtc:10191
Change-Id: I480da22f6db781e877dcb92d46ce7f445892df6a
Reviewed-on: https://webrtc-review.googlesource.com/c/118929
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26644}
2019-02-12 10:58:36 +00:00
Danil Chapovalov
710f3d3e44 Use task queue factory factory as parameter for TaskQueueTest
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}
2019-02-07 11:00:17 +00:00
Danil Chapovalov
87ce874f99 Allow link-time injection of the DefaultTaskQueueFactory
Bug: webrtc:10191
Change-Id: If6a2fb32bee63328cf2cb86be2aac69bc5bd65dd
Reviewed-on: https://webrtc-review.googlesource.com/c/120964
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26552}
2019-02-05 14:43:27 +00:00
Artem Titov
01f64e0eb2 Add test to verify TaskQueue memory access order.
Bug: webrtc:10138
Change-Id: I53e8a3a612ad44feced8d63a4035d79b7e0f22a9
Reviewed-on: https://webrtc-review.googlesource.com/c/120601
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26497}
2019-01-31 14:45:45 +00:00
Steve Anton
f380284035 (7) Rename files to snake_case: remove forwarding headers
Bug: webrtc:10159
Change-Id: I2ba899e0283b953538c7941c8790213e36d7c70e
Reviewed-on: https://webrtc-review.googlesource.com/c/118561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26417}
2019-01-26 00:33:46 +00:00
Danil Chapovalov
33b716f7dd Publish task queue test suite.
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}
2019-01-23 11:55:12 +00:00
Danil Chapovalov
b4c6d1e6d9 Connect global task queue factory and rtc::TaskQueue
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}
2019-01-21 16:08:31 +00:00
Danil Chapovalov
baaf911c80 Introduce global task queue factory.
Bug: webrtc:10191
Change-Id: I7bdc97fd626da955b9194a9a0d8ed4f5aebddf66
Reviewed-on: https://webrtc-review.googlesource.com/c/118120
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26315}
2019-01-18 11:25:15 +00:00
Danil Chapovalov
348b08ac3e Introduce webrtc::TaskQueue and TaskQueueFactory interfaces
Bug: webrtc:10191
Change-Id: Ia2fff34cb260d904f25f7263051695f1c004a53b
Reviewed-on: https://webrtc-review.googlesource.com/c/117360
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26295}
2019-01-17 13:10:14 +00:00
Danil Chapovalov
959e9b6b57 Publish rtc::QueuedTask in api as webrtc::QueuedTask
Bug: webrtc:10191
Change-Id: I7dcba28615c2f3e44442be410dedde15f5fb1deb
Reviewed-on: https://webrtc-review.googlesource.com/c/113502
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26244}
2019-01-14 14:48:12 +00:00