summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/api/environment/environment_factory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebrtc/api/environment/environment_factory.cc')
-rw-r--r--third_party/libwebrtc/api/environment/environment_factory.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/third_party/libwebrtc/api/environment/environment_factory.cc b/third_party/libwebrtc/api/environment/environment_factory.cc
index c0b681aa08..6f0ec40dbe 100644
--- a/third_party/libwebrtc/api/environment/environment_factory.cc
+++ b/third_party/libwebrtc/api/environment/environment_factory.cc
@@ -97,12 +97,22 @@ Environment EnvironmentFactory::CreateWithDefaults() && {
if (field_trials_ == nullptr) {
Set(std::make_unique<FieldTrialBasedConfig>());
}
+#if defined(WEBRTC_MOZILLA_BUILD)
+ // We want to use our clock, not GetRealTimeClockRaw, and we avoid
+ // building the code under third_party/libwebrtc/task_queue. To
+ // ensure we're setting up things correctly, namely providing an
+ // Environment object with a preset task_queue_factory and clock,
+ // we'll do a release assert here.
+ RTC_CHECK(clock_);
+ RTC_CHECK(task_queue_factory_);
+#else
if (clock_ == nullptr) {
Set(Clock::GetRealTimeClock());
}
if (task_queue_factory_ == nullptr) {
Set(CreateDefaultTaskQueueFactory(field_trials_));
}
+#endif
if (event_log_ == nullptr) {
Set(std::make_unique<RtcEventLogNull>());
}