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

Unified Diff: runtime/vm/os_thread_linux.cc

Issue 1537543002: Fix for issue 25236 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 5 years 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/os_thread_android.cc ('k') | runtime/vm/os_thread_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread_linux.cc
diff --git a/runtime/vm/os_thread_linux.cc b/runtime/vm/os_thread_linux.cc
index 4a08b84d2377ef98e2670088e5d5251bac760f31..f82123306e0c9d8141b3810da7edf58869f618a3 100644
--- a/runtime/vm/os_thread_linux.cc
+++ b/runtime/vm/os_thread_linux.cc
@@ -97,12 +97,14 @@ static void* ThreadStart(void* data_ptr) {
delete data;
// Create new OSThread object and set as TLS for new thread.
- OSThread* thread = new OSThread();
- OSThread::SetCurrent(thread);
- thread->set_name(name);
+ OSThread* thread = OSThread::CreateOSThread();
+ if (thread != NULL) {
+ OSThread::SetCurrent(thread);
+ thread->set_name(name);
- // Call the supplied thread start function handing it its parameters.
- function(parameter);
+ // Call the supplied thread start function handing it its parameters.
+ function(parameter);
+ }
return NULL;
}
« no previous file with comments | « runtime/vm/os_thread_android.cc ('k') | runtime/vm/os_thread_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698