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

Side by Side Diff: runtime/bin/process_macos.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_linux.cc ('k') | runtime/bin/process_unsupported.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_MACOS) 8 #if defined(TARGET_OS_MACOS)
9 9
10 #include "bin/process.h" 10 #include "bin/process.h"
(...skipping 17 matching lines...) Expand all
28 #include "bin/thread.h" 28 #include "bin/thread.h"
29 29
30 #include "platform/signal_blocker.h" 30 #include "platform/signal_blocker.h"
31 #include "platform/utils.h" 31 #include "platform/utils.h"
32 32
33 namespace dart { 33 namespace dart {
34 namespace bin { 34 namespace bin {
35 35
36 int Process::global_exit_code_ = 0; 36 int Process::global_exit_code_ = 0;
37 Mutex* Process::global_exit_code_mutex_ = new Mutex(); 37 Mutex* Process::global_exit_code_mutex_ = new Mutex();
38 Process::ExitHook Process::exit_hook_ = NULL;
38 39
39 // ProcessInfo is used to map a process id to the file descriptor for 40 // ProcessInfo is used to map a process id to the file descriptor for
40 // the pipe used to communicate the exit code of the process to Dart. 41 // the pipe used to communicate the exit code of the process to Dart.
41 // ProcessInfo objects are kept in the static singly-linked 42 // ProcessInfo objects are kept in the static singly-linked
42 // ProcessInfoList. 43 // ProcessInfoList.
43 class ProcessInfo { 44 class ProcessInfo {
44 public: 45 public:
45 ProcessInfo(pid_t pid, intptr_t fd) : pid_(pid), fd_(fd) { } 46 ProcessInfo(pid_t pid, intptr_t fd) : pid_(pid), fd_(fd) { }
46 ~ProcessInfo() { 47 ~ProcessInfo() {
47 int closed = TEMP_FAILURE_RETRY(close(fd_)); 48 int closed = TEMP_FAILURE_RETRY(close(fd_));
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL)); 1105 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL));
1105 } 1106 }
1106 } 1107 }
1107 1108
1108 } // namespace bin 1109 } // namespace bin
1109 } // namespace dart 1110 } // namespace dart
1110 1111
1111 #endif // defined(TARGET_OS_MACOS) 1112 #endif // defined(TARGET_OS_MACOS)
1112 1113
1113 #endif // !defined(DART_IO_DISABLED) 1114 #endif // !defined(DART_IO_DISABLED)
OLDNEW
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | runtime/bin/process_unsupported.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698