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

Unified Diff: runtime/vm/os_thread_android.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.cc ('k') | runtime/vm/os_thread_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread_android.cc
diff --git a/runtime/vm/os_thread_android.cc b/runtime/vm/os_thread_android.cc
index 6f7ff3435a0ed6c7fc817c05811e7d5b35bf64d1..c02fd9ab4a81b6f281a06b0b3721b7a8a82ccdc6 100644
--- a/runtime/vm/os_thread_android.cc
+++ b/runtime/vm/os_thread_android.cc
@@ -95,12 +95,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.cc ('k') | runtime/vm/os_thread_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698