From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- memory/replace/logalloc/LogAlloc.cpp | 4 ++-- memory/replace/logalloc/replay/Replay.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'memory/replace') diff --git a/memory/replace/logalloc/LogAlloc.cpp b/memory/replace/logalloc/LogAlloc.cpp index a976b0c674..d8fe93929b 100644 --- a/memory/replace/logalloc/LogAlloc.cpp +++ b/memory/replace/logalloc/LogAlloc.cpp @@ -21,7 +21,7 @@ #include "Mutex.h" static malloc_table_t sFuncs; -static intptr_t sFd = 0; +static platform_handle_t sFd = 0; static bool sStdoutOrStderr = false; static Mutex sMutex MOZ_UNANNOTATED; @@ -169,7 +169,7 @@ void replace_init(malloc_table_t* aTable, ReplaceMallocBridge** aBridge) { nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr); } if (handle != INVALID_HANDLE_VALUE) { - sFd = reinterpret_cast(handle); + sFd = handle; } #else if (fd == -1) { diff --git a/memory/replace/logalloc/replay/Replay.cpp b/memory/replace/logalloc/replay/Replay.cpp index a1b3217419..191a192bb8 100644 --- a/memory/replace/logalloc/replay/Replay.cpp +++ b/memory/replace/logalloc/replay/Replay.cpp @@ -458,7 +458,7 @@ class Distribution { mTotalRequests++; } - void printDist(intptr_t std_err) { + void printDist(platform_handle_t std_err) { MOZ_ASSERT(mMaxSize); // The translation to turn a slot index into a memory request size. @@ -533,7 +533,7 @@ class SMapsReader : private FdReader { return Some(SMapsReader(FdReader(fd, true))); } - Maybe readMap(intptr_t aStdErr) { + Maybe readMap(platform_handle_t aStdErr) { // This is not very tolerant of format changes because things like // parseNumber will crash if they get a bad value. TODO: make this // soft-fail. @@ -615,7 +615,7 @@ class Replay { Replay() { #ifdef _WIN32 // See comment in FdPrintf.h as to why native win32 handles are used. - mStdErr = reinterpret_cast(GetStdHandle(STD_ERROR_HANDLE)); + mStdErr = GetStdHandle(STD_ERROR_HANDLE); #else mStdErr = fileno(stderr); #endif @@ -1044,7 +1044,7 @@ class Replay { } } - intptr_t mStdErr; + platform_handle_t mStdErr; size_t mOps = 0; // The number of slots that have been used. It is used to iterate over slots -- cgit v1.2.3