From 76bf8d142bda6f8a53b2574a9fd89c67c6579efe Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Wed, 19 Jun 2024 00:07:31 +0000 Subject: [PATCH] Bug 1903440: Use MakeUnique instead of 'new' to initialize UniquePtr in RemotePrintJobParent. r=TYLin Differential Revision: https://phabricator.services.mozilla.com/D214184 --- layout/printing/ipc/RemotePrintJobParent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/printing/ipc/RemotePrintJobParent.cpp b/layout/printing/ipc/RemotePrintJobParent.cpp index 4e4e363a8ab4..3c6fbfa1da1d 100644 --- a/layout/printing/ipc/RemotePrintJobParent.cpp +++ b/layout/printing/ipc/RemotePrintJobParent.cpp @@ -46,7 +46,7 @@ mozilla::ipc::IPCResult RemotePrintJobParent::RecvInitializePrint( return IPC_OK(); } - mPrintTranslator.reset(new PrintTranslator(mPrintDeviceContext)); + mPrintTranslator = MakeUnique(mPrintDeviceContext); FileDescriptor fd; rv = PrepareNextPageFD(&fd); if (NS_FAILED(rv)) {