OLD | NEW |
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 "chrome/browser/nacl_host/nacl_process_host.h" | 5 #include "chrome/browser/nacl_host/nacl_process_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 } | 609 } |
610 | 610 |
611 bool NaClProcessHost::StartNaClExecution() { | 611 bool NaClProcessHost::StartNaClExecution() { |
612 NaClBrowser* nacl_browser = NaClBrowser::GetInstance(); | 612 NaClBrowser* nacl_browser = NaClBrowser::GetInstance(); |
613 | 613 |
614 nacl::NaClStartParams params; | 614 nacl::NaClStartParams params; |
615 params.validation_cache_enabled = nacl_browser->ValidationCacheIsEnabled(); | 615 params.validation_cache_enabled = nacl_browser->ValidationCacheIsEnabled(); |
616 params.validation_cache_key = nacl_browser->GetValidationCacheKey(); | 616 params.validation_cache_key = nacl_browser->GetValidationCacheKey(); |
617 params.version = chrome::VersionInfo().CreateVersionString(); | 617 params.version = chrome::VersionInfo().CreateVersionString(); |
618 params.enable_exception_handling = enable_exception_handling_; | 618 params.enable_exception_handling = enable_exception_handling_; |
| 619 params.enable_debug_stub = |
| 620 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNaClDebug); |
619 | 621 |
620 base::PlatformFile irt_file = nacl_browser->IrtFile(); | 622 base::PlatformFile irt_file = nacl_browser->IrtFile(); |
621 CHECK_NE(irt_file, base::kInvalidPlatformFileValue); | 623 CHECK_NE(irt_file, base::kInvalidPlatformFileValue); |
622 | 624 |
623 const ChildProcessData& data = process_->GetData(); | 625 const ChildProcessData& data = process_->GetData(); |
624 for (size_t i = 0; i < internal_->sockets_for_sel_ldr.size(); i++) { | 626 for (size_t i = 0; i < internal_->sockets_for_sel_ldr.size(); i++) { |
625 if (!ShareHandleToSelLdr(data.handle, | 627 if (!ShareHandleToSelLdr(data.handle, |
626 internal_->sockets_for_sel_ldr[i], true, | 628 internal_->sockets_for_sel_ldr[i], true, |
627 ¶ms.handles)) { | 629 ¶ms.handles)) { |
628 return false; | 630 return false; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 } else { | 765 } else { |
764 NaClStartDebugExceptionHandlerThread( | 766 NaClStartDebugExceptionHandlerThread( |
765 process_handle.Take(), info, | 767 process_handle.Take(), info, |
766 base::MessageLoopProxy::current(), | 768 base::MessageLoopProxy::current(), |
767 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 769 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
768 weak_factory_.GetWeakPtr())); | 770 weak_factory_.GetWeakPtr())); |
769 return true; | 771 return true; |
770 } | 772 } |
771 } | 773 } |
772 #endif | 774 #endif |
OLD | NEW |