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/webrtc.gni b/webrtc.gni
index 173d66c..447aae4 100644
--- a/webrtc.gni
+++ b/webrtc.gni
@@ -474,12 +474,14 @@
# Encoders and decoders for specific audio codecs such as Opus and iSAC.
"audio_codecs",
- # Default task queue implementation.
- "default_task_queue",
-
# Default echo detector implementation.
"default_echo_detector",
+ # Implementations of the utilities exposed through `Environment`.
+ # Most webrtc classes must use propagated `Environment`. Only few top-level
+ # classes are allowed to create `Environment` from individual utilities.
+ "environment_construction",
+
# Software video codecs (VP8 and VP9 through libvpx).
"software_video_codecs",
]