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

Side by Side Diff: base/logging.cc

Issue 234803002: disable more stacktrace usage in debug uclibc builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make sure glibc/uclibc macros are defined Created 6 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/debug/leak_tracker.h ('k') | build/build_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <io.h> 8 #include <io.h>
9 #include <windows.h> 9 #include <windows.h>
10 typedef HANDLE FileHandle; 10 typedef HANDLE FileHandle;
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 548
549 LogMessage::LogMessage(const char* file, int line, LogSeverity severity, 549 LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
550 std::string* result) 550 std::string* result)
551 : severity_(severity), file_(file), line_(line) { 551 : severity_(severity), file_(file), line_(line) {
552 Init(file, line); 552 Init(file, line);
553 stream_ << "Check failed: " << *result; 553 stream_ << "Check failed: " << *result;
554 delete result; 554 delete result;
555 } 555 }
556 556
557 LogMessage::~LogMessage() { 557 LogMessage::~LogMessage() {
558 #if !defined(NDEBUG) && !defined(OS_NACL) 558 #if !defined(NDEBUG) && !defined(OS_NACL) && !defined(__UCLIBC__)
559 if (severity_ == LOG_FATAL) { 559 if (severity_ == LOG_FATAL) {
560 // Include a stack trace on a fatal. 560 // Include a stack trace on a fatal.
561 base::debug::StackTrace trace; 561 base::debug::StackTrace trace;
562 stream_ << std::endl; // Newline to separate from log message. 562 stream_ << std::endl; // Newline to separate from log message.
563 trace.OutputToStream(&stream_); 563 trace.OutputToStream(&stream_);
564 } 564 }
565 #endif 565 #endif
566 stream_ << std::endl; 566 stream_ << std::endl;
567 std::string str_newline(stream_.str()); 567 std::string str_newline(stream_.str());
568 568
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 return *log_file_name; 848 return *log_file_name;
849 return std::wstring(); 849 return std::wstring();
850 } 850 }
851 #endif 851 #endif
852 852
853 } // namespace logging 853 } // namespace logging
854 854
855 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { 855 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
856 return out << base::WideToUTF8(std::wstring(wstr)); 856 return out << base::WideToUTF8(std::wstring(wstr));
857 } 857 }
OLDNEW
« no previous file with comments | « base/debug/leak_tracker.h ('k') | build/build_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698