Source code
Revision control
Copy as Markdown
Other Tools
From: Michael Froman <mfroman@mozilla.com>
Date: Mon, 24 Oct 2022 13:00:00 -0500
Add assurance that we will not build task_queue_win.cc to avoid
possible win32k API usage.
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/f097eb8cbd8b7686ce306a46a4db691194fd39c1
---
api/task_queue/BUILD.gn | 5 +++++
rtc_base/BUILD.gn | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/api/task_queue/BUILD.gn b/api/task_queue/BUILD.gn
index 7e6be706f8..bacc3ca87a 100644
--- a/api/task_queue/BUILD.gn
+++ b/api/task_queue/BUILD.gn
@@ -29,6 +29,11 @@ rtc_library("task_queue") {
]
}
+# Mozilla - we want to ensure that rtc_include_tests is set to false
+# to guarantee that default_task_queue_factory is not used so we
+# know that remaining win32k code in task_queue_win.cc is not built.
+assert(!rtc_include_tests, "Mozilla - verify rtc_include_tests is off")
if (rtc_include_tests) {
rtc_library("task_queue_test") {
visibility = [ "*" ]
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 0ed0780651..a4f2509a6a 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -724,10 +724,14 @@ if (is_mac || is_ios) {
if (is_win) {
rtc_library("rtc_task_queue_win") {
visibility = [ "../api/task_queue:default_task_queue_factory" ]
+# usage is removed.
+if (!build_with_mozilla) {
sources = [
"task_queue_win.cc",
"task_queue_win.h",
]
+}
deps = [
":checks",
":logging",