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

Side by Side Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 9235052: Fix race condition in utility process clients (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/nacl_host/nacl_process_host.h" 7 #include "chrome/browser/nacl_host/nacl_process_host.h"
8 8
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 #endif 296 #endif
297 297
298 return true; 298 return true;
299 } 299 }
300 300
301 void NaClProcessHost::OnProcessLaunchedByBroker(base::ProcessHandle handle) { 301 void NaClProcessHost::OnProcessLaunchedByBroker(base::ProcessHandle handle) {
302 process_->SetHandle(handle); 302 process_->SetHandle(handle);
303 OnProcessLaunched(); 303 OnProcessLaunched();
304 } 304 }
305 305
306 void NaClProcessHost::OnProcessCrashed(int exit_code) { 306 void NaClProcessHost::OnProcessCrashedOrWasKilled(int exit_code) {
307 std::string message = base::StringPrintf( 307 std::string message = base::StringPrintf(
308 "NaCl process exited with status %i (0x%x)", exit_code, exit_code); 308 "NaCl process exited with status %i (0x%x)", exit_code, exit_code);
309 LOG(ERROR) << message; 309 LOG(ERROR) << message;
310 } 310 }
311 311
312 namespace { 312 namespace {
313 313
314 // Determine the name of the IRT file based on the architecture. 314 // Determine the name of the IRT file based on the architecture.
315 315
316 #define NACL_IRT_FILE_NAME(arch_string) \ 316 #define NACL_IRT_FILE_NAME(arch_string) \
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 #endif 544 #endif
545 545
546 process_->Send(new NaClProcessMsg_Start(handles_for_sel_ldr)); 546 process_->Send(new NaClProcessMsg_Start(handles_for_sel_ldr));
547 internal_->sockets_for_sel_ldr.clear(); 547 internal_->sockets_for_sel_ldr.clear();
548 } 548 }
549 549
550 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { 550 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) {
551 NOTREACHED() << "Invalid message with type = " << msg.type(); 551 NOTREACHED() << "Invalid message with type = " << msg.type();
552 return false; 552 return false;
553 } 553 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698