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

Unified Diff: runtime/vm/log.cc

Issue 1897963002: Add --timeline-recorder= flag and fix --timeline-dir flag (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | runtime/vm/timeline.cc » ('j') | runtime/vm/timeline.cc » ('J')
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 91be51d604faf0c502a899e967d8291053642a52..f5247c7981aafb47d5a67767e88b0d7613d028cc 100644
--- a/runtime/vm/log.cc
+++ b/runtime/vm/log.cc
@@ -31,6 +31,11 @@ Log::~Log() {
Log* Log::Current() {
Thread* thread = Thread::Current();
+ if (thread == NULL) {
+ OSThread* os_thread = OSThread::Current();
+ ASSERT(os_thread != NULL);
+ return os_thread->log();
+ }
Isolate* isolate = thread->isolate();
if (isolate != NULL && Log::ShouldLogForIsolate(isolate)) {
OSThread* os_thread = thread->os_thread();
« no previous file with comments | « no previous file | runtime/vm/timeline.cc » ('j') | runtime/vm/timeline.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698