Bug 1826784 - Collect Third-Party Modules informations for Utility processes r=gstoll
Differential Revision: https://phabricator.services.mozilla.com/D174898
This commit is contained in:
@@ -156,7 +156,8 @@ void CGSShutdownServerConnections();
|
||||
|
||||
mozilla::ipc::IPCResult UtilityProcessChild::RecvInit(
|
||||
const Maybe<FileDescriptor>& aBrokerFd,
|
||||
const bool& aCanRecordReleaseTelemetry) {
|
||||
const bool& aCanRecordReleaseTelemetry,
|
||||
const bool& aIsReadyForBackgroundProcessing) {
|
||||
// Do this now (before closing WindowServer on macOS) to avoid risking
|
||||
// blocking in GetCurrentProcess() called on that platform
|
||||
mozilla::ipc::SetThisProcessName("Utility Process");
|
||||
@@ -182,7 +183,7 @@ mozilla::ipc::IPCResult UtilityProcessChild::RecvInit(
|
||||
#if defined(XP_WIN)
|
||||
if (aCanRecordReleaseTelemetry) {
|
||||
RefPtr<DllServices> dllSvc(DllServices::Get());
|
||||
dllSvc->StartUntrustedModulesProcessor(false);
|
||||
dllSvc->StartUntrustedModulesProcessor(aIsReadyForBackgroundProcessing);
|
||||
}
|
||||
#endif // defined(XP_WIN)
|
||||
return IPC_OK();
|
||||
@@ -272,7 +273,7 @@ mozilla::ipc::IPCResult UtilityProcessChild::RecvStartJSOracleService(
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
#if defined(XP_WIN)
|
||||
mozilla::ipc::IPCResult UtilityProcessChild::RecvStartWindowsUtilsService(
|
||||
Endpoint<dom::PWindowsUtilsChild>&& aEndpoint) {
|
||||
mWindowsUtilsInstance = new dom::WindowsUtilsChild();
|
||||
@@ -284,7 +285,28 @@ mozilla::ipc::IPCResult UtilityProcessChild::RecvStartWindowsUtilsService(
|
||||
MOZ_ASSERT(ok);
|
||||
return IPC_OK();
|
||||
}
|
||||
#endif
|
||||
|
||||
mozilla::ipc::IPCResult UtilityProcessChild::RecvGetUntrustedModulesData(
|
||||
GetUntrustedModulesDataResolver&& aResolver) {
|
||||
RefPtr<DllServices> dllSvc(DllServices::Get());
|
||||
dllSvc->GetUntrustedModulesData()->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[aResolver](Maybe<UntrustedModulesData>&& aData) {
|
||||
aResolver(std::move(aData));
|
||||
},
|
||||
[aResolver](nsresult aReason) { aResolver(Nothing()); });
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
UtilityProcessChild::RecvUnblockUntrustedModulesThread() {
|
||||
if (nsCOMPtr<nsIObserverService> obs =
|
||||
mozilla::services::GetObserverService()) {
|
||||
obs->NotifyObservers(nullptr, "unblock-untrusted-modules-thread", nullptr);
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
#endif // defined(XP_WIN)
|
||||
|
||||
void UtilityProcessChild::ActorDestroy(ActorDestroyReason aWhy) {
|
||||
if (AbnormalShutdown == aWhy) {
|
||||
|
||||
Reference in New Issue
Block a user