From 9306e92a0b28f7c70a3e29272141b0e271452479 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Thu, 29 Sep 2011 14:16:42 +0100 Subject: Use notable values when clearing Thread::startup_data_ to help with debugging Bug: 5244039 Change-Id: I2f91ceb69c140b70b550eda83aa6bbafc95631f2 --- base/threading/thread.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/base/threading/thread.cc b/base/threading/thread.cc index 7a100ca..cf5fc45 100644 --- a/base/threading/thread.cc +++ b/base/threading/thread.cc @@ -73,7 +73,12 @@ bool Thread::StartWithOptions(const Options& options) { if (!PlatformThread::Create(options.stack_size, this, &thread_)) { DLOG(ERROR) << "failed to create thread"; +#if defined(ANDROID) + // For debugging. See http://b/5244039 + startup_data_ = reinterpret_cast(0xdeadd00d); +#else startup_data_ = NULL; +#endif return false; } @@ -81,7 +86,12 @@ bool Thread::StartWithOptions(const Options& options) { startup_data.event.Wait(); // set it to NULL so we don't keep a pointer to some object on the stack. +#if defined(ANDROID) + // For debugging. See http://b/5244039 + startup_data_ = reinterpret_cast(0xbbadbeef); +#else startup_data_ = NULL; +#endif started_ = true; DCHECK(message_loop_); -- cgit v1.1