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: components/nacl/browser/nacl_process_host.cc

Issue 2585963002: Clarifying the parameters ownership of BrowserChildProcessHost::Launch() (Closed)
Patch Set: Fixed crasher on Windows. Created 3 years, 12 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/nacl/browser/nacl_process_host.h" 5 #include "components/nacl/browser/nacl_process_host.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 if (RunningOnWOW64()) { 570 if (RunningOnWOW64()) {
571 if (!NaClBrokerService::GetInstance()->LaunchLoader( 571 if (!NaClBrokerService::GetInstance()->LaunchLoader(
572 weak_factory_.GetWeakPtr(), 572 weak_factory_.GetWeakPtr(),
573 process_->GetServiceRequestChannelToken())) { 573 process_->GetServiceRequestChannelToken())) {
574 SendErrorToRenderer("broker service did not launch process"); 574 SendErrorToRenderer("broker service did not launch process");
575 return false; 575 return false;
576 } 576 }
577 return true; 577 return true;
578 } 578 }
579 #endif 579 #endif
580 process_->Launch(new NaClSandboxedProcessLauncherDelegate(), 580 process_->Launch(base::MakeUnique<NaClSandboxedProcessLauncherDelegate>(),
581 cmd_line.release(), true); 581 std::move(cmd_line), true);
582 return true; 582 return true;
583 } 583 }
584 584
585 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { 585 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) {
586 if (uses_nonsfi_mode_) { 586 if (uses_nonsfi_mode_) {
587 // IPC messages relating to NaCl's validation cache must not be exposed 587 // IPC messages relating to NaCl's validation cache must not be exposed
588 // in Non-SFI Mode, otherwise a Non-SFI nexe could use SetKnownToValidate 588 // in Non-SFI Mode, otherwise a Non-SFI nexe could use SetKnownToValidate
589 // to create a hole in the SFI sandbox. 589 // to create a hole in the SFI sandbox.
590 // In Non-SFI mode, no message is expected. 590 // In Non-SFI mode, no message is expected.
591 return false; 591 return false;
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 NaClStartDebugExceptionHandlerThread( 1164 NaClStartDebugExceptionHandlerThread(
1165 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), 1165 std::move(process), info, base::ThreadTaskRunnerHandle::Get(),
1166 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, 1166 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker,
1167 weak_factory_.GetWeakPtr())); 1167 weak_factory_.GetWeakPtr()));
1168 return true; 1168 return true;
1169 } 1169 }
1170 } 1170 }
1171 #endif 1171 #endif
1172 1172
1173 } // namespace nacl 1173 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/browser/nacl_broker_host_win.cc ('k') | content/browser/browser_child_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698