aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwebengine/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch')
-rw-r--r--recipes-qt/qt5/qtwebengine/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch34
1 files changed, 28 insertions, 6 deletions
diff --git a/recipes-qt/qt5/qtwebengine/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
index bf1f1891..1e187956 100644
--- a/recipes-qt/qt5/qtwebengine/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
+++ b/recipes-qt/qt5/qtwebengine/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
@@ -1,19 +1,41 @@
-From e695f37fc52defd1b96664b003444692e9b6cb65 Mon Sep 17 00:00:00 2001
+From f6c6a5522f006b14c4d9c4daa23f96c4e8e65a32 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:09:06 -0700
Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+ chromium/base/process/process_metrics_posix.cc | 4 ++--
chromium/base/trace_event/malloc_dump_provider.cc | 3 ++-
chromium/content/child/content_child_helpers.cc | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ 3 files changed, 5 insertions(+), 4 deletions(-)
+diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc
+index 0eb5c1f..8af7799 100644
+--- a/chromium/base/process/process_metrics_posix.cc
++++ b/chromium/base/process/process_metrics_posix.cc
+@@ -94,14 +94,14 @@ size_t ProcessMetrics::GetMallocUsage() {
+ malloc_statistics_t stats = {0};
+ malloc_zone_statistics(nullptr, &stats);
+ return stats.size_in_use;
+-#elif defined(OS_LINUX) || defined(OS_ANDROID)
++#elif defined(__GLIBC__) || defined(OS_ANDROID)
+ struct mallinfo minfo = mallinfo();
+ #if defined(USE_TCMALLOC)
+ return minfo.uordblks;
+ #else
+ return minfo.hblkhd + minfo.arena;
+ #endif
+-#elif defined(OS_FUCHSIA)
++#else
+ // TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
+ return 0;
+ #endif
diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc
-index 7d0cb57931..10be59ebad 100644
+index 14ba0a2..e5d9581 100644
--- a/chromium/base/trace_event/malloc_dump_provider.cc
+++ b/chromium/base/trace_event/malloc_dump_provider.cc
-@@ -210,6 +210,7 @@ MallocDumpProvider::~MallocDumpProvider() {}
+@@ -197,6 +197,7 @@ MallocDumpProvider::~MallocDumpProvider() {}
// the current process.
bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
ProcessMemoryDump* pmd) {
@@ -21,7 +43,7 @@ index 7d0cb57931..10be59ebad 100644
size_t total_virtual_size = 0;
size_t resident_size = 0;
size_t allocated_objects_size = 0;
-@@ -321,7 +322,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
+@@ -317,7 +318,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
pmd->DumpHeapUsage(metrics_by_context, overhead, "malloc");
}
tid_dumping_heap_ = kInvalidThreadId;
@@ -31,7 +53,7 @@ index 7d0cb57931..10be59ebad 100644
}
diff --git a/chromium/content/child/content_child_helpers.cc b/chromium/content/child/content_child_helpers.cc
-index 7ddeb4d16a..b8c73b09c5 100644
+index 7ddeb4d..b8c73b0 100644
--- a/chromium/content/child/content_child_helpers.cc
+++ b/chromium/content/child/content_child_helpers.cc
@@ -25,7 +25,7 @@ namespace content {