tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 37040fa3e41e019003054932a4cda5f46cf4f04e
parent 3cbe332f1e13fb7d78b0329ed36f716746787386
Author: Michael Froman <mfroman@mozilla.com>
Date:   Thu,  9 Oct 2025 15:33:45 -0500

Bug 1993083 - Vendor libwebrtc from 0538249260

Upstream commit: https://webrtc.googlesource.com/src/+/0538249260f59ba93f0d5686d6808a3460ec7a3a
    Remove the export_perf_results_new_api flag.

    Change-Id: Ia86b6860a9fe7cc3de4ef5ce3de048dd0a975ca9
    Bug: webrtc:429586259
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/399240
    Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
    Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45194}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/test/ios/test_support.h | 1-
Mthird_party/libwebrtc/test/ios/test_support.mm | 81++++++++++++++++++++++++++-----------------------------------------------------
Mthird_party/libwebrtc/test/test_flags.cc | 5-----
Mthird_party/libwebrtc/test/test_flags.h | 1-
Mthird_party/libwebrtc/test/test_main_lib.cc | 38+++++++++-----------------------------
6 files changed, 37 insertions(+), 93 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 /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T20:32:30.497661+00:00. +libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T20:33:35.840136+00:00. # base of lastest vendoring -33e9f8fabe +0538249260 diff --git a/third_party/libwebrtc/test/ios/test_support.h b/third_party/libwebrtc/test/ios/test_support.h @@ -25,7 +25,6 @@ void InitTestSuite(int (*test_suite)(void), int argc, char* argv[], bool save_chartjson_result, - bool export_perf_results_new_api, std::string webrtc_test_metrics_output_path, std::optional<std::vector<std::string>> metrics_to_plot); diff --git a/third_party/libwebrtc/test/ios/test_support.mm b/third_party/libwebrtc/test/ios/test_support.mm @@ -45,7 +45,6 @@ static int (*g_test_suite)(void) = NULL; static int g_argc; static char **g_argv; static bool g_write_perf_output; -static bool g_export_perf_results_new_api; static std::string g_webrtc_test_metrics_output_path; static std::optional<bool> g_is_xctest; static std::optional<std::vector<std::string>> g_metrics_to_plot; @@ -101,63 +100,37 @@ static std::optional<std::vector<std::string>> g_metrics_to_plot; NSArray<NSString *> *outputDirectories = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES); std::vector<std::unique_ptr<webrtc::test::MetricsExporter>> exporters; - if (g_export_perf_results_new_api) { - exporters.push_back( - std::make_unique<webrtc::test::StdoutMetricsExporter>()); - if (g_write_perf_output) { - // Stores data into a proto file under the app's document directory. - NSString *fileName = @"perftest-output.pb"; - if ([outputDirectories count] != 0) { - NSString *outputPath = - [outputDirectories[0] stringByAppendingPathComponent:fileName]; - - exporters.push_back( - std::make_unique<webrtc::test::ChromePerfDashboardMetricsExporter>( - [NSString stdStringForString:outputPath])); - } + exporters.push_back(std::make_unique<webrtc::test::StdoutMetricsExporter>()); + if (g_write_perf_output) { + // Stores data into a proto file under the app's document directory. + NSString *fileName = @"perftest-output.pb"; + if ([outputDirectories count] != 0) { + NSString *outputPath = + [outputDirectories[0] stringByAppendingPathComponent:fileName]; + + exporters.push_back( + std::make_unique<webrtc::test::ChromePerfDashboardMetricsExporter>( + [NSString stdStringForString:outputPath])); } - if (!g_webrtc_test_metrics_output_path.empty()) { - RTC_CHECK_EQ(g_webrtc_test_metrics_output_path.find('/'), - std::string::npos) - << "On iOS, --webrtc_test_metrics_output_path must only be a file " - "name."; - if ([outputDirectories count] != 0) { - NSString *fileName = [NSString - stringWithCString:g_webrtc_test_metrics_output_path.c_str() - encoding:[NSString defaultCStringEncoding]]; - NSString *outputPath = - [outputDirectories[0] stringByAppendingPathComponent:fileName]; - exporters.push_back( - std::make_unique<webrtc::test::MetricsSetProtoFileExporter>( - webrtc::test::MetricsSetProtoFileExporter::Options( - [NSString stdStringForString:outputPath]))); - } + } + if (!g_webrtc_test_metrics_output_path.empty()) { + RTC_CHECK_EQ(g_webrtc_test_metrics_output_path.find('/'), std::string::npos) + << "On iOS, --webrtc_test_metrics_output_path must only be a file " + "name."; + if ([outputDirectories count] != 0) { + NSString *fileName = + [NSString stringWithCString:g_webrtc_test_metrics_output_path.c_str() + encoding:[NSString defaultCStringEncoding]]; + NSString *outputPath = + [outputDirectories[0] stringByAppendingPathComponent:fileName]; + exporters.push_back( + std::make_unique<webrtc::test::MetricsSetProtoFileExporter>( + webrtc::test::MetricsSetProtoFileExporter::Options( + [NSString stdStringForString:outputPath]))); } - } else { - exporters.push_back( - std::make_unique<webrtc::test::PrintResultProxyMetricsExporter>()); } webrtc::test::ExportPerfMetric(*webrtc::test::GetGlobalMetricsLogger(), std::move(exporters)); - if (!g_export_perf_results_new_api) { - if (g_write_perf_output) { - // Stores data into a proto file under the app's document directory. - NSString *fileName = @"perftest-output.pb"; - if ([outputDirectories count] != 0) { - NSString *outputPath = - [outputDirectories[0] stringByAppendingPathComponent:fileName]; - - if (!webrtc::test::WritePerfResults( - [NSString stdStringForString:outputPath])) { - return 1; - } - } - } - if (g_metrics_to_plot) { - webrtc::test::PrintPlottableResults(*g_metrics_to_plot); - } - } - return exitStatus; } @@ -191,14 +164,12 @@ void InitTestSuite(int (*test_suite)(void), int argc, char *argv[], bool write_perf_output, - bool export_perf_results_new_api, std::string webrtc_test_metrics_output_path, std::optional<std::vector<std::string>> metrics_to_plot) { g_test_suite = test_suite; g_argc = argc; g_argv = argv; g_write_perf_output = write_perf_output; - g_export_perf_results_new_api = export_perf_results_new_api; g_webrtc_test_metrics_output_path = webrtc_test_metrics_output_path; g_metrics_to_plot = std::move(metrics_to_plot); } diff --git a/third_party/libwebrtc/test/test_flags.cc b/third_party/libwebrtc/test/test_flags.cc @@ -39,11 +39,6 @@ ABSL_FLAG(std::string, "and the file will be stored under NSDocumentDirectory."); ABSL_FLAG(bool, - export_perf_results_new_api, - true, - "Tells to initialize new API for exporting performance metrics"); - -ABSL_FLAG(bool, webrtc_quick_perf_test, false, "Runs webrtc perfomance tests in quick mode."); diff --git a/third_party/libwebrtc/test/test_flags.h b/third_party/libwebrtc/test/test_flags.h @@ -18,7 +18,6 @@ ABSL_DECLARE_FLAG(std::vector<std::string>, plot); ABSL_DECLARE_FLAG(std::string, isolated_script_test_perf_output); ABSL_DECLARE_FLAG(std::string, webrtc_test_metrics_output_path); -ABSL_DECLARE_FLAG(bool, export_perf_results_new_api); ABSL_DECLARE_FLAG(bool, webrtc_quick_perf_test); #endif // TEST_TEST_FLAGS_H_ diff --git a/third_party/libwebrtc/test/test_main_lib.cc b/third_party/libwebrtc/test/test_main_lib.cc @@ -28,7 +28,6 @@ #include "api/test/metrics/metric.h" #include "api/test/metrics/metrics_exporter.h" #include "api/test/metrics/metrics_set_proto_file_exporter.h" -#include "api/test/metrics/print_result_proxy_metrics_exporter.h" #include "api/test/metrics/stdout_metrics_exporter.h" #include "rtc_base/event_tracer.h" #include "rtc_base/logging.h" @@ -38,7 +37,6 @@ #include "test/gtest.h" #include "test/test_flags.h" #include "test/testsupport/file_utils.h" -#include "test/testsupport/perf_test.h" #include "test/testsupport/resources_dir_flag.h" #if defined(RTC_USE_PERFETTO) @@ -188,7 +186,6 @@ class TestMainImpl : public TestMain { #if defined(WEBRTC_IOS) test::InitTestSuite(RUN_ALL_TESTS, argc, argv, absl::GetFlag(FLAGS_write_perf_output_on_ios), - absl::GetFlag(FLAGS_export_perf_results_new_api), absl::GetFlag(FLAGS_webrtc_test_metrics_output_path), metrics_to_plot); test::RunTestsFromIOSApp(); @@ -197,21 +194,16 @@ class TestMainImpl : public TestMain { int exit_code = RUN_ALL_TESTS(); std::vector<std::unique_ptr<test::MetricsExporter>> exporters; - if (absl::GetFlag(FLAGS_export_perf_results_new_api)) { - exporters.push_back(std::make_unique<test::StdoutMetricsExporter>()); - if (!absl::GetFlag(FLAGS_webrtc_test_metrics_output_path).empty()) { - exporters.push_back(std::make_unique<test::MetricsSetProtoFileExporter>( - test::MetricsSetProtoFileExporter::Options( - absl::GetFlag(FLAGS_webrtc_test_metrics_output_path)))); - } - if (!absl::GetFlag(FLAGS_isolated_script_test_perf_output).empty()) { - exporters.push_back( - std::make_unique<test::ChromePerfDashboardMetricsExporter>( - absl::GetFlag(FLAGS_isolated_script_test_perf_output))); - } - } else { + exporters.push_back(std::make_unique<test::StdoutMetricsExporter>()); + if (!absl::GetFlag(FLAGS_webrtc_test_metrics_output_path).empty()) { + exporters.push_back(std::make_unique<test::MetricsSetProtoFileExporter>( + test::MetricsSetProtoFileExporter::Options( + absl::GetFlag(FLAGS_webrtc_test_metrics_output_path)))); + } + if (!absl::GetFlag(FLAGS_isolated_script_test_perf_output).empty()) { exporters.push_back( - std::make_unique<test::PrintResultProxyMetricsExporter>()); + std::make_unique<test::ChromePerfDashboardMetricsExporter>( + absl::GetFlag(FLAGS_isolated_script_test_perf_output))); } // Log number of tests that should be run, are disabled or skipped and total // number. @@ -239,18 +231,6 @@ class TestMainImpl : public TestMain { test::ExportPerfMetric(*test::GetGlobalMetricsLogger(), std::move(exporters)); - if (!absl::GetFlag(FLAGS_export_perf_results_new_api)) { - std::string perf_output_file = - absl::GetFlag(FLAGS_isolated_script_test_perf_output); - if (!perf_output_file.empty()) { - if (!test::WritePerfResults(perf_output_file)) { - return 1; - } - } - if (metrics_to_plot) { - test::PrintPlottableResults(*metrics_to_plot); - } - } std::string result_filename = absl::GetFlag(FLAGS_isolated_script_test_output);