Closed Bug 1508468 Opened 6 years ago Closed 6 years ago

Make launcher process use mozilla::Result

Categories

(Firefox :: General, enhancement)

Unspecified
Windows
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

(Whiteboard: inj+)

Attachments

(1 file, 1 obsolete file)

This gives us a way to properly propagate errors up to the top of the launcher process' call stack, at which point we can call into a handler to do something appropriate.
This patch does a couple of things: * I added a new class, |WindowsError| to WinHeaderOnlyUtils. The idea here is to encapsulate as much of the Windows error gamut as possible into one class. Since Win32 errors and NTSTATUS codes may both be encoded as HRESULTs, I used the latter type to store the error. It also contains functions for converting between the various error code formats, as well as stringification via FormatMessage. * I added |LauncherError| which also includes file and line number information, which I believe will be important for launcher process failure diagnostics. (Instantiation of LauncherErrors obviously must be done via macros to capture __FILE__ and __LINE__). * I then converted all of the launcher process code (and its few depenencies) to utilize this new functionality via the new |LauncherResult| type. * If we detect an error in one of the top-level launcher process functions, we pass it to |HandleLauncherError| for processing. This function currently just throws up a |MessageBox| like the previous code did, with the intention of enhancing that further in the future.
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5660a1cd0e25 Convert launcher process to use mozilla::Result for error propagation; r=mhowell
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0ff2e89a1819 Convert launcher process to use mozilla::Result for error propagation; r=mhowell
Flags: needinfo?(aklotz)
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/be8383028bc0 Convert launcher process to use mozilla::Result for error propagation; r=mhowell
Attachment #9026548 - Attachment is obsolete: true
Attachment #9026548 - Attachment is obsolete: false
Attachment #9026548 - Attachment is obsolete: true
Flags: needinfo?(aklotz)
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa0d05453365 Convert launcher process to use mozilla::Result for error propagation; r=mhowell
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: