--disable-maintenance-service should exclude all maintenance service-related code
Categories
(Toolkit :: Application Update, defect, P3)
Tracking
()
People
(Reporter: mcs, Assigned: mcs)
Details
(Whiteboard: [tor 31547])
Attachments
(1 file)
See https://trac.torproject.org/projects/tor/ticket/31547
Tor Browser builds with --disable-maintenance-service
and one of our goals is to avoid including code that will never be executed (thus reducing code surface area). Some recent updater changes have caused more maintenance service-related code to be linked into the updater, even when --disable-maintenance-service
is used. For example, toolkit/mozapps/update/common/certificatecheck.cpp
is now pulled in.
This can be fixed by making better use of the MOZ_MAINTENANCE_SERVICE
macro inside updater.cpp
and related files. For example, inside the LaunchCallbackAndPostProcessApps()
function, the following block should be inside a #if defined(MOZ_MAINTENANCE_SERVICE)
section:
if (!sUsingService) {
StartServiceUpdate(gInstallDirPath);
}
![]() |
||
Comment 1•5 years ago
|
||
Mark, is the ifdef around the code snippet you posted the only thing that needs to be done for this bug?
Assignee | ||
Comment 2•5 years ago
|
||
(In reply to Robert Strong [:rstrong] (Robert they/them - use needinfo to contact me) from comment #1)
Mark, is the ifdef around the code snippet you posted the only thing that needs to be done for this bug?
I am not sure, but I think there are a few more places where #ifdefs should be added. Unfortunately, I don't have time right now to do the (hopefully fairly quick) analysis that is necessary.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Exclude Windows Maintenance Service-related C++ code and avoid linking
with unnecessary libraries when building with --disable-maintenance-service.
Updated•5 years ago
|
Comment 4•5 years ago
•
|
||
Note that we also removed references to the ONLY_SERVICE_LAUNCHING
macro since it has not been used in several years.
Comment 6•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•