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

Unified Diff: runtime/vm/log.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/log.h ('k') | runtime/vm/log_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/log.cc
diff --git a/runtime/vm/log.cc b/runtime/vm/log.cc
index 28db12c77a1cbb5f540536225c596b5bf8f5f276..9e941e3ef765f138f48a4f756495a24f383759b7 100644
--- a/runtime/vm/log.cc
+++ b/runtime/vm/log.cc
@@ -22,13 +22,11 @@ DEFINE_FLAG(charp,
Log::Log(LogPrinter printer)
: printer_(printer), manual_flush_(0), buffer_(0) {}
-
Log::~Log() {
// Did someone enable manual flushing and then forgot to Flush?
ASSERT(cursor() == 0);
}
-
Log* Log::Current() {
Thread* thread = Thread::Current();
if (thread == NULL) {
@@ -46,7 +44,6 @@ Log* Log::Current() {
}
}
-
void Log::Print(const char* format, ...) {
if (this == NoOpLog()) {
return;
@@ -58,7 +55,6 @@ void Log::Print(const char* format, ...) {
va_end(args);
}
-
void Log::VPrint(const char* format, va_list args) {
if (this == NoOpLog()) {
return;
@@ -89,7 +85,6 @@ void Log::VPrint(const char* format, va_list args) {
}
}
-
void Log::Flush(const intptr_t cursor) {
if (this == NoOpLog()) {
return;
@@ -107,7 +102,6 @@ void Log::Flush(const intptr_t cursor) {
buffer_.TruncateTo(cursor);
}
-
void Log::Clear() {
if (this == NoOpLog()) {
return;
@@ -115,12 +109,10 @@ void Log::Clear() {
buffer_.TruncateTo(0);
}
-
intptr_t Log::cursor() const {
return buffer_.length();
}
-
bool Log::ShouldLogForIsolate(const Isolate* isolate) {
if (FLAG_isolate_log_filter == NULL) {
if (isolate->is_service_isolate()) {
@@ -138,13 +130,11 @@ bool Log::ShouldLogForIsolate(const Isolate* isolate) {
return true;
}
-
Log Log::noop_log_;
Log* Log::NoOpLog() {
return &noop_log_;
}
-
void Log::TerminateString() {
if (this == NoOpLog()) {
return;
@@ -152,7 +142,6 @@ void Log::TerminateString() {
buffer_.Add('\0');
}
-
void Log::EnableManualFlush() {
if (this == NoOpLog()) {
return;
@@ -160,7 +149,6 @@ void Log::EnableManualFlush() {
manual_flush_++;
}
-
void Log::DisableManualFlush() {
if (this == NoOpLog()) {
return;
@@ -173,12 +161,10 @@ void Log::DisableManualFlush() {
}
}
-
void LogBlock::Initialize() {
log_->EnableManualFlush();
}
-
LogBlock::~LogBlock() {
log_->Flush(cursor_);
log_->DisableManualFlush();
« no previous file with comments | « runtime/vm/log.h ('k') | runtime/vm/log_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698