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

Unified Diff: runtime/vm/os_thread_win.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_macos.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread_win.cc
diff --git a/runtime/vm/os_thread_win.cc b/runtime/vm/os_thread_win.cc
index 52fbd983fe6bdd8c7a1463f1929f14d77d8927e2..7a29d0da46c27fe457788279a3651f183cd87fb4 100644
--- a/runtime/vm/os_thread_win.cc
+++ b/runtime/vm/os_thread_win.cc
@@ -52,12 +52,14 @@ static unsigned int __stdcall ThreadEntry(void* data_ptr) {
MonitorData::GetMonitorWaitDataForThread();
// 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);
+ }
// Clean up the monitor wait data for this thread.
MonitorWaitData::ThreadExit();
« no previous file with comments | « runtime/vm/os_thread_macos.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698