commit 7c4f8c6c3ca0216842fc9c5c5de53da2a4df55c5
parent 67bd5318da47e5047a390a50bc4a2641fe13792f
Author: Dan Baker <dbaker@mozilla.com>
Date: Thu, 23 Oct 2025 17:38:08 -0600
Bug 1995393 - Vendor libwebrtc from ffde1c8637
Upstream commit: https://webrtc.googlesource.com/src/+/ffde1c8637c236e1c8e34b2d8cb5346187883f5c
Use injected clock in port
Stops using the global clock methods from time_utils.
This CL was uploaded by an experimental version of git cl split
(https://crbug.com/389069356).
R=danilchap@webrtc.org, hta@webrtc.org
Bug: webrtc:42223992
Change-Id: Ib4f8fb75a725790ef1a8ffb81eb58d05404ee316
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/404943
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45383}
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T23:35:09.183741+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T23:37:56.315257+00:00.
# base of lastest vendoring
-9d79cd6bcc
+ffde1c8637
diff --git a/third_party/libwebrtc/p2p/base/port.cc b/third_party/libwebrtc/p2p/base/port.cc
@@ -53,7 +53,6 @@
#include "rtc_base/string_encode.h"
#include "rtc_base/string_utils.h"
#include "rtc_base/strings/string_builder.h"
-#include "rtc_base/time_utils.h"
#include "rtc_base/trace_event.h"
#include "rtc_base/weak_ptr.h"
@@ -830,7 +829,8 @@ void Port::DestroyIfDead() {
bool dead =
(state_ == State::INIT || state_ == State::PRUNED) &&
connections_.empty() &&
- TimeMillis() - last_time_all_connections_removed_ >= timeout_delay_;
+ env_.clock().TimeInMilliseconds() - last_time_all_connections_removed_ >=
+ timeout_delay_;
if (dead) {
Destroy();
}
@@ -899,7 +899,7 @@ bool Port::OnConnectionDestroyed(Connection* conn) {
// fails and is removed before kPortTimeoutDelay, then this message will
// not cause the Port to be destroyed.
if (connections_.empty()) {
- last_time_all_connections_removed_ = TimeMillis();
+ last_time_all_connections_removed_ = env_.clock().TimeInMilliseconds();
PostDestroyIfDead(/*delayed=*/true);
}