| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/log.h" | 5 #include "vm/log.h" |
| 6 | 6 |
| 7 #include "vm/flags.h" | 7 #include "vm/flags.h" |
| 8 #include "vm/thread.h" | 8 #include "vm/thread.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 void Log::DisableManualFlush() { | 111 void Log::DisableManualFlush() { |
| 112 manual_flush_--; | 112 manual_flush_--; |
| 113 ASSERT(manual_flush_ >= 0); | 113 ASSERT(manual_flush_ >= 0); |
| 114 if (manual_flush_ == 0) { | 114 if (manual_flush_ == 0) { |
| 115 Flush(); | 115 Flush(); |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 | 118 |
| 119 | 119 |
| 120 LogBlock::LogBlock(Thread* thread, Log* log) | 120 LogBlock::LogBlock(Thread* thread, Log* log) |
| 121 : StackResource(thread->isolate()), | 121 : StackResource(thread), |
| 122 log_(log), cursor_(log->cursor()) { | 122 log_(log), cursor_(log->cursor()) { |
| 123 CommonConstructor(); | 123 CommonConstructor(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 | 126 |
| 127 LogBlock::LogBlock(Isolate* isolate) | 127 LogBlock::LogBlock(Isolate* isolate) |
| 128 : StackResource(isolate), | 128 : StackResource(isolate), |
| 129 log_(isolate->Log()), cursor_(isolate->Log()->cursor()) { | 129 log_(isolate->Log()), cursor_(isolate->Log()->cursor()) { |
| 130 CommonConstructor(); | 130 CommonConstructor(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 | 133 |
| 134 LogBlock::LogBlock(Thread* thread) | 134 LogBlock::LogBlock(Thread* thread) |
| 135 : StackResource(thread->isolate()), | 135 : StackResource(thread), |
| 136 log_(thread->isolate()->Log()), | 136 log_(thread->isolate()->Log()), |
| 137 cursor_(thread->isolate()->Log()->cursor()) { | 137 cursor_(thread->isolate()->Log()->cursor()) { |
| 138 CommonConstructor(); | 138 CommonConstructor(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace dart | 141 } // namespace dart |
| OLD | NEW |