Closed Bug 1588549 Opened 5 years ago Closed 5 years ago

--disable-maintenance-service should exclude all maintenance service-related code

Categories

(Toolkit :: Application Update, defect, P3)

All
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox71 --- wontfix
firefox78 --- fixed

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);
      }

Mark, is the ifdef around the code snippet you posted the only thing that needs to be done for this bug?

Flags: needinfo?(mcs)
Priority: -- → P3

(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.

Flags: needinfo?(mcs)

Exclude Windows Maintenance Service-related C++ code and avoid linking
with unnecessary libraries when building with --disable-maintenance-service.

Assignee: nobody → mcs
Status: NEW → ASSIGNED

Note that we also removed references to the ONLY_SERVICE_LAUNCHING macro since it has not been used in several years.

Pushed by rmaries@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3b4fac567f42 disable-maintenance-service should exclude all maintenance service-related code r=bytesized,mhowell
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: