aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
diff options
context:
space:
mode:
authorMatthias Wolf <freebsd@rheinwolf.de>2022-02-01 17:38:49 +0000
committerRene Ladan <rene@FreeBSD.org>2022-02-01 17:45:40 +0000
commitaa70a996eae7376396a5dd8a9e5105bebb6bc72c (patch)
treeee91e0564101803a57091d4df8e4f3892eb8d0fc /www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
parent6d3db655f87ec3f89d074c523534f83fd01f56e5 (diff)
downloadports-aa70a996eae7376396a5dd8a9e5105bebb6bc72c.tar.gz
ports-aa70a996eae7376396a5dd8a9e5105bebb6bc72c.zip
www/chromium: update to 97.0.4692.99
Diffstat (limited to 'www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc')
-rw-r--r--www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc42
1 files changed, 27 insertions, 15 deletions
diff --git a/www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc b/www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
index 8b020cf5af31..c8722784b6ee 100644
--- a/www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
+++ b/www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
@@ -1,7 +1,7 @@
---- base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2021-04-14 18:40:48 UTC
+--- base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2021-12-14 11:44:55 UTC
+++ base/allocator/allocator_shim_default_dispatch_to_glibc.cc
-@@ -6,18 +6,28 @@
- #include "base/compiler_specific.h"
+@@ -10,18 +10,28 @@
+ #include "base/process/memory.h"
#include <dlfcn.h>
-#include <malloc.h>
@@ -36,34 +36,46 @@
} // extern "C"
namespace {
-@@ -25,32 +35,32 @@ namespace {
- using base::allocator::AllocatorDispatch;
+@@ -39,7 +49,7 @@ void* GlibcMalloc(const AllocatorDispatch*, size_t siz
+ if (UNLIKELY(size >= kMaxAllowedSize))
+ base::TerminateBecauseOutOfMemory(size);
+
+- return __libc_malloc(size);
++ return __malloc(size);
+ }
+
+ void* GlibcUncheckedMalloc(const AllocatorDispatch*,
+@@ -48,7 +58,7 @@ void* GlibcUncheckedMalloc(const AllocatorDispatch*,
+ if (UNLIKELY(size >= kMaxAllowedSize))
+ return nullptr;
- void* GlibcMalloc(const AllocatorDispatch*, size_t size, void* context) {
- return __libc_malloc(size);
+ return __malloc(size);
}
void* GlibcCalloc(const AllocatorDispatch*,
- size_t n,
- size_t size,
- void* context) {
+@@ -59,7 +69,7 @@ void* GlibcCalloc(const AllocatorDispatch*,
+ if (UNLIKELY(!total.IsValid() || total.ValueOrDie() >= kMaxAllowedSize))
+ base::TerminateBecauseOutOfMemory(size * n);
+
- return __libc_calloc(n, size);
+ return __calloc(n, size);
}
void* GlibcRealloc(const AllocatorDispatch*,
- void* address,
- size_t size,
- void* context) {
+@@ -69,7 +79,7 @@ void* GlibcRealloc(const AllocatorDispatch*,
+ if (UNLIKELY(size >= kMaxAllowedSize))
+ base::TerminateBecauseOutOfMemory(size);
+
- return __libc_realloc(address, size);
+ return __realloc(address, size);
}
void* GlibcMemalign(const AllocatorDispatch*,
- size_t alignment,
- size_t size,
- void* context) {
+@@ -79,11 +89,11 @@ void* GlibcMemalign(const AllocatorDispatch*,
+ if (UNLIKELY(size >= kMaxAllowedSize))
+ base::TerminateBecauseOutOfMemory(size);
+
- return __libc_memalign(alignment, size);
+ return __memalign(alignment, size);
}