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

Side by Side Diff: runtime/bin/process.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/process.h ('k') | runtime/bin/process_android.cc » ('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/dartutils.h" 5 #include "bin/dartutils.h"
6 #include "bin/io_buffer.h" 6 #include "bin/io_buffer.h"
7 #include "bin/platform.h" 7 #include "bin/platform.h"
8 #include "bin/process.h" 8 #include "bin/process.h"
9 #include "bin/socket.h" 9 #include "bin/socket.h"
10 #include "bin/utils.h" 10 #include "bin/utils.h"
11 11
12 #include "include/dart_api.h" 12 #include "include/dart_api.h"
13 13
14 namespace dart { 14 namespace dart {
15 namespace bin { 15 namespace bin {
16 16
17 static const int kProcessIdNativeField = 0; 17 static const int kProcessIdNativeField = 0;
18 18
19 int Process::global_exit_code_ = 0; 19 int Process::global_exit_code_ = 0;
20 dart::Mutex* Process::global_exit_code_mutex_ = new dart::Mutex(); 20 Mutex* Process::global_exit_code_mutex_ = new Mutex();
21 21
22 // Extract an array of C strings from a list of Dart strings. 22 // Extract an array of C strings from a list of Dart strings.
23 static char** ExtractCStringList(Dart_Handle strings, 23 static char** ExtractCStringList(Dart_Handle strings,
24 Dart_Handle status_handle, 24 Dart_Handle status_handle,
25 const char* error_msg, 25 const char* error_msg,
26 intptr_t* length) { 26 intptr_t* length) {
27 static const intptr_t kMaxArgumentListLength = 1024 * 1024; 27 static const intptr_t kMaxArgumentListLength = 1024 * 1024;
28 ASSERT(Dart_IsList(strings)); 28 ASSERT(Dart_IsList(strings));
29 intptr_t len = 0; 29 intptr_t len = 0;
30 Dart_Handle result = Dart_ListLength(strings, &len); 30 Dart_Handle result = Dart_ListLength(strings, &len);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 int external_length = strlen(system_string); 304 int external_length = strlen(system_string);
305 uint8_t* buffer = NULL; 305 uint8_t* buffer = NULL;
306 Dart_Handle external_array = IOBuffer::Allocate(external_length, &buffer); 306 Dart_Handle external_array = IOBuffer::Allocate(external_length, &buffer);
307 memmove(buffer, system_string, external_length); 307 memmove(buffer, system_string, external_length);
308 if (utf8 != system_string) free(const_cast<char*>(system_string)); 308 if (utf8 != system_string) free(const_cast<char*>(system_string));
309 Dart_SetReturnValue(args, external_array); 309 Dart_SetReturnValue(args, external_array);
310 } 310 }
311 311
312 } // namespace bin 312 } // namespace bin
313 } // namespace dart 313 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/process.h ('k') | runtime/bin/process_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698