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

Side by Side Diff: runtime/bin/vmservice_impl.cc

Issue 471743002: - Make sure that the threads for dart::bin are in the correct namespace. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/thread_win.cc ('k') | runtime/vm/lockers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/vmservice_impl.h" 5 #include "bin/vmservice_impl.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 }; 87 };
88 88
89 const char* VmService::error_msg_ = NULL; 89 const char* VmService::error_msg_ = NULL;
90 90
91 bool VmService::Start(const char *server_ip, intptr_t server_port) { 91 bool VmService::Start(const char *server_ip, intptr_t server_port) {
92 bool r = _Start(server_ip, server_port); 92 bool r = _Start(server_ip, server_port);
93 if (!r) { 93 if (!r) {
94 return r; 94 return r;
95 } 95 }
96 // Start processing messages in a new thread. 96 // Start processing messages in a new thread.
97 dart::Thread::Start(ThreadMain, static_cast<uword>(NULL)); 97 Thread::Start(ThreadMain, static_cast<uword>(NULL));
98 return true; 98 return true;
99 } 99 }
100 100
101 101
102 bool VmService::_Start(const char *server_ip, intptr_t server_port) { 102 bool VmService::_Start(const char *server_ip, intptr_t server_port) {
103 ASSERT(Dart_CurrentIsolate() == NULL); 103 ASSERT(Dart_CurrentIsolate() == NULL);
104 Dart_Isolate isolate = Dart_GetServiceIsolate(NULL); 104 Dart_Isolate isolate = Dart_GetServiceIsolate(NULL);
105 if (isolate == NULL) { 105 if (isolate == NULL) {
106 error_msg_ = "Internal error."; 106 error_msg_ = "Internal error.";
107 return false; 107 return false;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 printf("Service exited with an error:\n%s\n", Dart_GetError(result)); 301 printf("Service exited with an error:\n%s\n", Dart_GetError(result));
302 } 302 }
303 Dart_ExitScope(); 303 Dart_ExitScope();
304 Dart_ExitIsolate(); 304 Dart_ExitIsolate();
305 } 305 }
306 306
307 307
308 308
309 } // namespace bin 309 } // namespace bin
310 } // namespace dart 310 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/thread_win.cc ('k') | runtime/vm/lockers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698