Add environment_construction poison
This poison guards against accidental use of EnvironmentFactory and thus ensures low level WebRTC class would use utilities from propagated environment instead of accidentally using a default implementation.
This poison extends and thus replaces default task queue poison.
Bug: webrtc:15656
Change-Id: I577bef8af08b9c7dd649ad5a2284eb236e6f4a8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41247}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index e57092e..c187a7d 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -54,7 +54,7 @@
visibility = [ "*" ]
allow_poison = [
"audio_codecs",
- "default_task_queue",
+ "environment_construction",
"software_video_codecs",
]
sources = [
@@ -77,7 +77,7 @@
if (!build_with_chromium) {
rtc_library("create_peerconnection_factory") {
visibility = [ "*" ]
- allow_poison = [ "default_task_queue" ]
+ allow_poison = [ "environment_construction" ]
sources = [
"create_peerconnection_factory.cc",
"create_peerconnection_factory.h",