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

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

Issue 8227010: Fix deadlock in process exit handling (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from @ager Created 9 years, 2 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_impl.dart » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/process.h" 6 #include "bin/process.h"
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 void FUNCTION_NAME(Process_Start)(Dart_NativeArguments args) { 10 void FUNCTION_NAME(Process_Start)(Dart_NativeArguments args) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 DartUtils::SetIntegerInstanceField( 54 DartUtils::SetIntegerInstanceField(
55 status_handle, "_errorCode", error_code); 55 status_handle, "_errorCode", error_code);
56 DartUtils::SetStringInstanceField( 56 DartUtils::SetStringInstanceField(
57 status_handle, "_errorMessage", os_error_message); 57 status_handle, "_errorMessage", os_error_message);
58 } 58 }
59 delete[] string_args; 59 delete[] string_args;
60 Dart_SetReturnValue(args, Dart_NewBoolean(error_code == 0)); 60 Dart_SetReturnValue(args, Dart_NewBoolean(error_code == 0));
61 Dart_ExitScope(); 61 Dart_ExitScope();
62 } 62 }
63 63
64
64 void FUNCTION_NAME(Process_Kill)(Dart_NativeArguments args) { 65 void FUNCTION_NAME(Process_Kill)(Dart_NativeArguments args) {
65 Dart_EnterScope(); 66 Dart_EnterScope();
66 intptr_t pid = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 1)); 67 intptr_t pid = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 1));
67 bool success = Process::Kill(pid); 68 bool success = Process::Kill(pid);
68 Dart_SetReturnValue(args, Dart_NewBoolean(success)); 69 Dart_SetReturnValue(args, Dart_NewBoolean(success));
69 Dart_ExitScope(); 70 Dart_ExitScope();
70 } 71 }
72
73
74 void FUNCTION_NAME(Process_Exit)(Dart_NativeArguments args) {
75 Dart_EnterScope();
76 intptr_t pid = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 1));
77 Process::Exit(pid);
78 Dart_ExitScope();
79 }
OLDNEW
« no previous file with comments | « runtime/bin/process.h ('k') | runtime/bin/process_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698