Closed Bug 1895375 Opened 10 months ago Closed 10 months ago

Improve error propagation for out-of-process file-picker failures, round 2

Categories

(Core :: Widget: Win32, task)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: rkraesig, Assigned: rkraesig)

References

Details

Attachments

(5 files)

Error-site data is collected by the utility process launcher and propagated internally, but is not generally provided to its clients.

However, error-site data is exactly what's desired by file-picker telemetry to determine the underlying cause of launch-failure errors, so let's go ahead and do that.

As the intended use for LaunchError::mFunction is telemetry, avoid the
possibility of accidental exfiltration of PII by requiring that
LaunchError be constructed from StaticString.

No functional changes.

Assignee: nobody → rkraesig
Status: NEW → ASSIGNED

As with the previous commit, avoid the possibility of accidental
exfiltration of PII by requiring that filedialog::Error be constructed
from StaticString.

No functional changes.

Since the location field of a LaunchError is a static, telemetry-safe
string, allow creating an fd::Error therefrom.

(Such an Error won't be serializable over IPDL, but that's fine -- if we
have a LaunchError, we must be in the main process and so have no need
to worry about serializing it.)

  • Adjust GeckoChildProcessHost to return ipc::LaunchErrors to its
    clients.

  • Adjust UtilityProcessHost to propagate ipc::LaunchErrors for
    its clients, or to create new ones where none previously existed.

  • Adjust the various clients of the above to to handle the additional
    information -- mostly by adding the additional failure-location data
    to log messages.

In particular, filedialog::Error objects should now contain -- and report
to telemetry without further adjustment -- the actual error code from
ipc::LaunchErrors.

(Reporting the original failure location as well will occur in bug
1884221.)

Attachment #9400513 - Attachment description: Bug 1895375 - [1/4] Adjust ipc::LaunchError to use StaticString r?#ipc-reviewers!,#win-reviewers! → Bug 1895375 - [1/4] Adjust types associated with ipc::LaunchError r?#ipc-reviewers!,#win-reviewers!
Pushed by rkraesig@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/89eb91c37298 [1/4] Adjust types associated with ipc::LaunchError r=ipc-reviewers,win-reviewers,gstoll,nika https://hg.mozilla.org/integration/autoland/rev/3f5ca5edd343 [2/4] Adjust filedialog::Error to use StaticString r=win-reviewers,gstoll https://hg.mozilla.org/integration/autoland/rev/632b10bbca9c [3/4] Allow creating fd::Errors from ipc::LaunchErrors r=win-reviewers,gstoll https://hg.mozilla.org/integration/autoland/rev/b4086527c442 [4/4] Propagate ipc::LaunchErrors to callers r=ipc-reviewers,nika

Patch [3/4] in the previous patchset removed an #include, breaking
non-unified builds. Replace it.

Attachment #9404882 - Attachment description: WIP: Bug 1895375 - Followup: fix non-unified builds → Bug 1895375 - Followup: fix non-unified builds r?CosminS
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/94093b6cb25b Followup: fix non-unified builds. a=bustage-fix CLOSED TREE
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/8bc6fa2ba2e8 Followup: fix non-unified builds. a=bustage-fix CLOSED TREE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: