mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 953296 - Convert ScopedDeletePtr to UniquePtr in toolkit/components/maintenanceservice/serviceinstall.cpp. r=bbondy
--HG-- extra : rebase_source : 15e5da4db5e2f1ec198b888f1abfe7fa702f1261
This commit is contained in:
parent
596c7fa06c
commit
6c2d127725
@ -11,7 +11,7 @@
|
||||
#include <lm.h>
|
||||
|
||||
#include <nsWindowsHelpers.h>
|
||||
#include "mozilla/Scoped.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
||||
#include "serviceinstall.h"
|
||||
#include "servicebase.h"
|
||||
@ -64,7 +64,7 @@ GetVersionNumberFromPath(LPWSTR path, DWORD &A, DWORD &B,
|
||||
DWORD &C, DWORD &D)
|
||||
{
|
||||
DWORD fileVersionInfoSize = GetFileVersionInfoSizeW(path, 0);
|
||||
mozilla::ScopedDeleteArray<char> fileVersionInfo(new char[fileVersionInfoSize]);
|
||||
mozilla::UniquePtr<char[]> fileVersionInfo(new char[fileVersionInfoSize]);
|
||||
if (!GetFileVersionInfoW(path, 0, fileVersionInfoSize,
|
||||
fileVersionInfo.get())) {
|
||||
LOG_WARN(("Could not obtain file info of old service. (%d)",
|
||||
@ -285,7 +285,7 @@ SvcInstall(SvcInstallAction action)
|
||||
|
||||
// Get the service config information, in particular we want the binary
|
||||
// path of the service.
|
||||
mozilla::ScopedDeleteArray<char> serviceConfigBuffer(new char[bytesNeeded]);
|
||||
mozilla::UniquePtr<char[]> serviceConfigBuffer(new char[bytesNeeded]);
|
||||
if (!QueryServiceConfigW(schService,
|
||||
reinterpret_cast<QUERY_SERVICE_CONFIGW*>(serviceConfigBuffer.get()),
|
||||
bytesNeeded, &bytesNeeded)) {
|
||||
|
Loading…
Reference in New Issue
Block a user