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

Unified Diff: runtime/vm/log.cc

Issue 2995793002: Revert "[VM logging] Fix nesting of log blocker." (Closed)
Patch Set: Created 3 years, 4 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') | no next file » | 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 23005a74c306b5d2076c2f68ee63beed20b17122..9e941e3ef765f138f48a4f756495a24f383759b7 100644
--- a/runtime/vm/log.cc
+++ b/runtime/vm/log.cc
@@ -149,7 +149,7 @@ void Log::EnableManualFlush() {
manual_flush_++;
}
-void Log::DisableManualFlush(const intptr_t cursor) {
+void Log::DisableManualFlush() {
if (this == NoOpLog()) {
return;
}
@@ -157,7 +157,7 @@ void Log::DisableManualFlush(const intptr_t cursor) {
manual_flush_--;
ASSERT(manual_flush_ >= 0);
if (manual_flush_ == 0) {
- Flush(cursor);
+ Flush();
}
}
@@ -166,7 +166,8 @@ void LogBlock::Initialize() {
}
LogBlock::~LogBlock() {
- log_->DisableManualFlush(cursor_);
+ log_->Flush(cursor_);
+ log_->DisableManualFlush();
}
} // namespace dart
« no previous file with comments | « runtime/vm/log.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698