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

Unified Diff: runtime/vm/log.cc

Issue 2994143002: [VM logging] Fix nesting of log blocker. (Closed)
Patch Set: address comment 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 9e941e3ef765f138f48a4f756495a24f383759b7..23005a74c306b5d2076c2f68ee63beed20b17122 100644
--- a/runtime/vm/log.cc
+++ b/runtime/vm/log.cc
@@ -149,7 +149,7 @@ void Log::EnableManualFlush() {
manual_flush_++;
}
-void Log::DisableManualFlush() {
+void Log::DisableManualFlush(const intptr_t cursor) {
if (this == NoOpLog()) {
return;
}
@@ -157,7 +157,7 @@ void Log::DisableManualFlush() {
manual_flush_--;
ASSERT(manual_flush_ >= 0);
if (manual_flush_ == 0) {
- Flush();
+ Flush(cursor);
}
}
@@ -166,8 +166,7 @@ void LogBlock::Initialize() {
}
LogBlock::~LogBlock() {
- log_->Flush(cursor_);
- log_->DisableManualFlush();
+ log_->DisableManualFlush(cursor_);
}
} // 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