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

Unified Diff: runtime/vm/log.cc

Issue 1691853002: Fix multi-threaded access to logs (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | 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 b7f65891634e1e78fea1fc654ba4f770fb23d953..91be51d604faf0c502a899e967d8291053642a52 100644
--- a/runtime/vm/log.cc
+++ b/runtime/vm/log.cc
@@ -141,16 +141,26 @@ Log* Log::NoOpLog() {
void Log::TerminateString() {
+ if (this == NoOpLog()) {
+ return;
+ }
buffer_.Add('\0');
}
void Log::EnableManualFlush() {
+ if (this == NoOpLog()) {
+ return;
+ }
manual_flush_++;
}
void Log::DisableManualFlush() {
+ if (this == NoOpLog()) {
+ return;
+ }
+
manual_flush_--;
ASSERT(manual_flush_ >= 0);
if (manual_flush_ == 0) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698