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

Side by Side Diff: base/logging.cc

Issue 2807463004: GN: aix port along with linux_s390x, linux_ppc64 and linux_ppc64le support. (Closed)
Patch Set: Created 3 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
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 #include <limits.h> 7 #include <limits.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/debug/activity_tracker.h" 10 #include "base/debug/activity_tracker.h"
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 524
525 LogMessage::LogMessage(const char* file, int line, LogSeverity severity, 525 LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
526 std::string* result) 526 std::string* result)
527 : severity_(severity), file_(file), line_(line) { 527 : severity_(severity), file_(file), line_(line) {
528 Init(file, line); 528 Init(file, line);
529 stream_ << "Check failed: " << *result; 529 stream_ << "Check failed: " << *result;
530 delete result; 530 delete result;
531 } 531 }
532 532
533 LogMessage::~LogMessage() { 533 LogMessage::~LogMessage() {
534 #if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) 534 #if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
535 !defined(OS_AIX)
535 if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) { 536 if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
536 // Include a stack trace on a fatal, unless a debugger is attached. 537 // Include a stack trace on a fatal, unless a debugger is attached.
537 base::debug::StackTrace trace; 538 base::debug::StackTrace trace;
538 stream_ << std::endl; // Newline to separate from log message. 539 stream_ << std::endl; // Newline to separate from log message.
539 trace.OutputToStream(&stream_); 540 trace.OutputToStream(&stream_);
540 } 541 }
541 #endif 542 #endif
542 stream_ << std::endl; 543 stream_ << std::endl;
543 std::string str_newline(stream_.str()); 544 std::string str_newline(stream_.str());
544 545
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 BASE_EXPORT void LogErrorNotReached(const char* file, int line) { 948 BASE_EXPORT void LogErrorNotReached(const char* file, int line) {
948 LogMessage(file, line, LOG_ERROR).stream() 949 LogMessage(file, line, LOG_ERROR).stream()
949 << "NOTREACHED() hit."; 950 << "NOTREACHED() hit.";
950 } 951 }
951 952
952 } // namespace logging 953 } // namespace logging
953 954
954 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { 955 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) {
955 return out << (wstr ? base::WideToUTF8(wstr) : std::string()); 956 return out << (wstr ? base::WideToUTF8(wstr) : std::string());
956 } 957 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698