]> git.armaanb.net Git - asd-repo.git/blob - extra/chromium/patches/musl-stacktrace.patch
Switch browser to Chromium
[asd-repo.git] / extra / chromium / patches / musl-stacktrace.patch
1 diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc
2 index f5e2dbb..0f2ce52 100644
3 --- a/base/debug/stack_trace.cc
4 +++ b/base/debug/stack_trace.cc
5 @@ -217,7 +217,9 @@ void StackTrace::Print() const {
6  }
7  
8  void StackTrace::OutputToStream(std::ostream* os) const {
9 +#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX)
10    OutputToStreamWithPrefix(os, nullptr);
11 +#endif
12  }
13  
14  std::string StackTrace::ToString() const {
15 @@ -225,7 +227,7 @@ std::string StackTrace::ToString() const {
16  }
17  std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
18    std::stringstream stream;
19 -#if !defined(__UCLIBC__) && !defined(_AIX)
20 +#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX)
21    OutputToStreamWithPrefix(&stream, prefix_string);
22  #endif
23    return stream.str();
24 diff --git a/base/logging.cc b/base/logging.cc
25 index 7722d37..a623e78 100644
26 --- a/base/logging.cc
27 +++ b/base/logging.cc
28 @@ -558,8 +558,8 @@ LogMessage::LogMessage(const char* file, int line, const char* condition)
29  
30  LogMessage::~LogMessage() {
31    size_t stack_start = stream_.tellp();
32 -#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
33 -    !defined(OS_AIX)
34 +#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) && \
35 +    !defined(__UCLIBC__) && !defined(OS_AIX)
36    if (severity_ == LOGGING_FATAL && !base::debug::BeingDebugged()) {
37      // Include a stack trace on a fatal, unless a debugger is attached.
38      base::debug::StackTrace stack_trace;