packages: chromium-browser/debug_util_posix-fix.patch (NEW) - http://code.g...

glen glen at pld-linux.org
Sun Sep 20 12:41:30 CEST 2009


Author: glen                         Date: Sun Sep 20 10:41:30 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- http://code.google.com/p/chromium/issues/detail?id=22076
  Variables can be NULL on OSX, but not on Linux

---- Files affected:
packages/chromium-browser:
   debug_util_posix-fix.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/chromium-browser/debug_util_posix-fix.patch
diff -u /dev/null packages/chromium-browser/debug_util_posix-fix.patch:1.1
--- /dev/null	Sun Sep 20 12:41:30 2009
+++ packages/chromium-browser/debug_util_posix-fix.patch	Sun Sep 20 12:41:25 2009
@@ -0,0 +1,40 @@
+diff -up chromium-20090916svn26424/src/base/debug_util_posix.cc.BAD chromium-20090916svn26424/src/base/debug_util_posix.cc
+--- chromium-20090916svn26424/src/base/debug_util_posix.cc.BAD	2009-09-16 22:57:39.000000000 -0400
++++ chromium-20090916svn26424/src/base/debug_util_posix.cc	2009-09-16 22:57:46.000000000 -0400
+@@ -116,9 +116,13 @@ void DebugUtil::BreakDebugger() {
+ }
+ 
+ StackTrace::StackTrace() {
++#if defined(OS_MACOSX)
+   if (backtrace == NULL) {
+     count_ = 0;
+   } else {
++#else
++  {
++#endif
+     // Though the backtrace API man page does not list any possible negative
+     // return values, we take no chance.
+     count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);
+@@ -126,14 +130,22 @@ StackTrace::StackTrace() {
+ }
+ 
+ void StackTrace::PrintBacktrace() {
++#if defined(OS_MACOSX)
+   if (backtrace_symbols_fd != NULL) {
++#else
++  {
++#endif
+     fflush(stderr);
+     backtrace_symbols_fd(trace_, count_, STDERR_FILENO);
+   }
+ }
+ 
+ void StackTrace::OutputToStream(std::ostream* os) {
++#if defined(OS_MACOSX)
+   if (backtrace_symbols != NULL) {
++#else
++  {
++#endif
+     scoped_ptr_malloc<char*> trace_symbols(backtrace_symbols(trace_, count_));
+ 
+     // If we can't retrieve the symbols, print an error and just dump the raw
================================================================


More information about the pld-cvs-commit mailing list