OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #define NACL_LOG_MODULE_NAME "Plugin_ServiceRuntime" | 7 #define NACL_LOG_MODULE_NAME "Plugin_ServiceRuntime" |
8 | 8 |
9 #include "ppapi/native_client/src/trusted/plugin/service_runtime.h" | 9 #include "ppapi/native_client/src/trusted/plugin/service_runtime.h" |
10 | 10 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 NaClLog(LOG_ERROR, "ServiceRuntime::Start (subprocess create failed)\n"); | 137 NaClLog(LOG_ERROR, "ServiceRuntime::Start (subprocess create failed)\n"); |
138 ErrorInfo error_info; | 138 ErrorInfo error_info; |
139 error_info.SetReport( | 139 error_info.SetReport( |
140 PP_NACL_ERROR_SEL_LDR_CREATE_LAUNCHER, | 140 PP_NACL_ERROR_SEL_LDR_CREATE_LAUNCHER, |
141 "ServiceRuntime: failed to create sel_ldr launcher"); | 141 "ServiceRuntime: failed to create sel_ldr launcher"); |
142 ReportLoadError(error_info); | 142 ReportLoadError(error_info); |
143 pp::Module::Get()->core()->CallOnMainThread(0, callback, PP_ERROR_FAILED); | 143 pp::Module::Get()->core()->CallOnMainThread(0, callback, PP_ERROR_FAILED); |
144 return; | 144 return; |
145 } | 145 } |
146 | 146 |
147 bool enable_dev_interfaces = | |
148 GetNaClInterface()->DevInterfacesEnabled(pp_instance_); | |
149 | |
150 GetNaClInterface()->LaunchSelLdr( | 147 GetNaClInterface()->LaunchSelLdr( |
151 pp_instance_, | 148 pp_instance_, |
152 PP_FromBool(main_service_runtime_), | 149 PP_FromBool(main_service_runtime_), |
153 params.url.c_str(), | 150 params.url.c_str(), |
154 ¶ms.file_info, | 151 ¶ms.file_info, |
155 PP_FromBool(uses_nonsfi_mode_), | 152 PP_FromBool(uses_nonsfi_mode_), |
156 PP_FromBool(enable_dev_interfaces), | |
157 params.process_type, | 153 params.process_type, |
158 &bootstrap_channel_, | 154 &bootstrap_channel_, |
159 callback.pp_completion_callback()); | 155 callback.pp_completion_callback()); |
160 subprocess_.reset(tmp_subprocess.release()); | 156 subprocess_.reset(tmp_subprocess.release()); |
161 } | 157 } |
162 | 158 |
163 bool ServiceRuntime::WaitForSelLdrStart() { | 159 bool ServiceRuntime::WaitForSelLdrStart() { |
164 // Time to wait on condvar (for browser to create a new sel_ldr process on | 160 // Time to wait on condvar (for browser to create a new sel_ldr process on |
165 // our behalf). Use 6 seconds to be *fairly* conservative. | 161 // our behalf). Use 6 seconds to be *fairly* conservative. |
166 // | 162 // |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 NaClLog(4, "ServiceRuntime::~ServiceRuntime (this=%p)\n", | 296 NaClLog(4, "ServiceRuntime::~ServiceRuntime (this=%p)\n", |
301 static_cast<void*>(this)); | 297 static_cast<void*>(this)); |
302 // We do this just in case Shutdown() was not called. | 298 // We do this just in case Shutdown() was not called. |
303 subprocess_.reset(NULL); | 299 subprocess_.reset(NULL); |
304 | 300 |
305 NaClCondVarDtor(&cond_); | 301 NaClCondVarDtor(&cond_); |
306 NaClMutexDtor(&mu_); | 302 NaClMutexDtor(&mu_); |
307 } | 303 } |
308 | 304 |
309 } // namespace plugin | 305 } // namespace plugin |
OLD | NEW |