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

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

Issue 23903007: Remove ASSERT which was reported as a race by ThreadSanitizer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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_linux.cc ('k') | no next file » | 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 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "bin/process.h" 8 #include "bin/process.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Mark write end non-blocking. 144 // Mark write end non-blocking.
145 FDUtils::SetNonBlocking(sig_chld_fds_[1]); 145 FDUtils::SetNonBlocking(sig_chld_fds_[1]);
146 146
147 // Thread started and the ExitCodeHandler is initialized. 147 // Thread started and the ExitCodeHandler is initialized.
148 initialized_ = true; 148 initialized_ = true;
149 return true; 149 return true;
150 } 150 }
151 151
152 // Get the write end of the pipe. 152 // Get the write end of the pipe.
153 static int WakeUpFd() { 153 static int WakeUpFd() {
154 ASSERT(initialized_);
155 return sig_chld_fds_[1]; 154 return sig_chld_fds_[1];
156 } 155 }
157 156
158 static void TerminateExitCodeThread() { 157 static void TerminateExitCodeThread() {
159 MutexLocker locker(mutex_); 158 MutexLocker locker(mutex_);
160 if (!initialized_) { 159 if (!initialized_) {
161 return; 160 return;
162 } 161 }
163 162
164 uint8_t data = kThreadTerminateByte; 163 uint8_t data = kThreadTerminateByte;
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 700
702 701
703 intptr_t Process::CurrentProcessId() { 702 intptr_t Process::CurrentProcessId() {
704 return static_cast<intptr_t>(getpid()); 703 return static_cast<intptr_t>(getpid());
705 } 704 }
706 705
707 } // namespace bin 706 } // namespace bin
708 } // namespace dart 707 } // namespace dart
709 708
710 #endif // defined(TARGET_OS_MACOS) 709 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698