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

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

Issue 2463923002: Don't use IsolateData for the exit hook as multiple embedders share the dart/bin while using differ… (Closed)
Patch Set: check secondary Created 4 years, 1 month 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
« no previous file with comments | « runtime/bin/process.cc ('k') | runtime/bin/process_fuchsia.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #if !defined(DART_IO_DISABLED) 5 #if !defined(DART_IO_DISABLED)
6 6
7 #include "platform/globals.h" 7 #include "platform/globals.h"
8 #if defined(TARGET_OS_ANDROID) 8 #if defined(TARGET_OS_ANDROID)
9 9
10 #include "bin/process.h" 10 #include "bin/process.h"
(...skipping 16 matching lines...) Expand all
27 #include "platform/signal_blocker.h" 27 #include "platform/signal_blocker.h"
28 #include "platform/utils.h" 28 #include "platform/utils.h"
29 29
30 extern char **environ; 30 extern char **environ;
31 31
32 namespace dart { 32 namespace dart {
33 namespace bin { 33 namespace bin {
34 34
35 int Process::global_exit_code_ = 0; 35 int Process::global_exit_code_ = 0;
36 Mutex* Process::global_exit_code_mutex_ = new Mutex(); 36 Mutex* Process::global_exit_code_mutex_ = new Mutex();
37 Process::ExitHook Process::exit_hook_ = NULL;
37 38
38 // ProcessInfo is used to map a process id to the file descriptor for 39 // ProcessInfo is used to map a process id to the file descriptor for
39 // the pipe used to communicate the exit code of the process to Dart. 40 // the pipe used to communicate the exit code of the process to Dart.
40 // ProcessInfo objects are kept in the static singly-linked 41 // ProcessInfo objects are kept in the static singly-linked
41 // ProcessInfoList. 42 // ProcessInfoList.
42 class ProcessInfo { 43 class ProcessInfo {
43 public: 44 public:
44 ProcessInfo(pid_t pid, intptr_t fd) : pid_(pid), fd_(fd) { } 45 ProcessInfo(pid_t pid, intptr_t fd) : pid_(pid), fd_(fd) { }
45 ~ProcessInfo() { 46 ~ProcessInfo() {
46 int closed = TEMP_FAILURE_RETRY(close(fd_)); 47 int closed = TEMP_FAILURE_RETRY(close(fd_));
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL)); 1038 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL));
1038 } 1039 }
1039 } 1040 }
1040 1041
1041 } // namespace bin 1042 } // namespace bin
1042 } // namespace dart 1043 } // namespace dart
1043 1044
1044 #endif // defined(TARGET_OS_ANDROID) 1045 #endif // defined(TARGET_OS_ANDROID)
1045 1046
1046 #endif // !defined(DART_IO_DISABLED) 1047 #endif // !defined(DART_IO_DISABLED)
OLDNEW
« no previous file with comments | « runtime/bin/process.cc ('k') | runtime/bin/process_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698