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

Unified Diff: runtime/vm/thread_interrupter.cc

Issue 1284223003: Don't crash on SIGPROF from foreign sources. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « 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/thread_interrupter.cc
diff --git a/runtime/vm/thread_interrupter.cc b/runtime/vm/thread_interrupter.cc
index 3ba1231e3929172627bdd9e4204930f04002010f..23e6c22fc4df17365db199763c694b035edc0769 100644
--- a/runtime/vm/thread_interrupter.cc
+++ b/runtime/vm/thread_interrupter.cc
@@ -226,7 +226,8 @@ InterruptableThreadState* ThreadInterrupter::GetCurrentThreadState() {
InterruptableThreadState* ThreadInterrupter::CurrentThreadState() {
- return Thread::Current()->thread_state();
+ Thread* thread = Thread::Current();
+ return (thread == NULL) ? NULL : thread->thread_state();
}
« 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