Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1843)

Unified Diff: base/debug/stack_trace.h

Issue 11362048: GTTF: Make Linux stack dump signal handler async-signal safe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybot debugging ios & android Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/debug/stack_trace.h
diff --git a/base/debug/stack_trace.h b/base/debug/stack_trace.h
index 60d5821a7094293ad576bee730ed0569759c5272..4da065bb55220b5a23f7e95cf05de31c2b9431db 100644
--- a/base/debug/stack_trace.h
+++ b/base/debug/stack_trace.h
@@ -73,6 +73,20 @@ class BASE_EXPORT StackTrace {
size_t count_;
};
+namespace internal {
+
+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_IOS)
+// POSIX doesn't define any async-signal safe function for converting
+// an integer to ASCII. We'll have to define our own version.
+// itoa_r() converts a (signed) integer to ASCII. It returns "buf", if the
+// conversion was successful or NULL otherwise. It never writes more than "sz"
+// bytes. Output will be truncated as needed, and a NUL character is always
+// appended.
+BASE_EXPORT char *itoa_r(intptr_t i, char *buf, size_t sz, int base);
+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_IOS)
+
+} // namespace internal
+
} // namespace debug
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698