diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /xpcom/tests/gtest/TestAllocReplacement.cpp | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xpcom/tests/gtest/TestAllocReplacement.cpp')
-rw-r--r-- | xpcom/tests/gtest/TestAllocReplacement.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/xpcom/tests/gtest/TestAllocReplacement.cpp b/xpcom/tests/gtest/TestAllocReplacement.cpp index 4b2c41b0f3..e0f0d001d5 100644 --- a/xpcom/tests/gtest/TestAllocReplacement.cpp +++ b/xpcom/tests/gtest/TestAllocReplacement.cpp @@ -73,34 +73,3 @@ TEST(AllocReplacement, posix_memalign_check) }); } #endif - -#if defined(XP_WIN) -# include <windows.h> - -# undef ASSERT_ALLOCATION_HAPPENED -# define ASSERT_ALLOCATION_HAPPENED(lambda) \ - ASSERT_TRUE(ValidateHookedAllocation( \ - lambda, [](void* p) { HeapFree(GetProcessHeap(), 0, p); })); - -TEST(AllocReplacement, HeapAlloc_check) -{ - ASSERT_ALLOCATION_HAPPENED([] { - HANDLE h = GetProcessHeap(); - return HeapAlloc(h, 0, kAllocAmount); - }); -} - -TEST(AllocReplacement, HeapReAlloc_check) -{ - ASSERT_ALLOCATION_HAPPENED([] { - HANDLE h = GetProcessHeap(); - void* p = HeapAlloc(h, 0, kAllocAmount / 2); - - if (!p) { - return static_cast<void*>(nullptr); - } - - return HeapReAlloc(h, 0, p, kAllocAmount); - }); -} -#endif |