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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/service_runtime.h

Issue 332463003: Pepper: Remove LOAD_MODULE SRPC call in SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 5 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 /* -*- c++ -*- */ 1 /* -*- c++ -*- */
2 /* 2 /*
3 * Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 * Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 // A class containing information regarding a socket connection to a 8 // A class containing information regarding a socket connection to a
9 // service runtime instance. 9 // service runtime instance.
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 void SignalStartSelLdrDone(); 170 void SignalStartSelLdrDone();
171 171
172 // If starting the nexe from a background thread, wait for the nexe to 172 // If starting the nexe from a background thread, wait for the nexe to
173 // actually start. Returns |true| is the nexe started successfully. 173 // actually start. Returns |true| is the nexe started successfully.
174 bool WaitForNexeStart(); 174 bool WaitForNexeStart();
175 175
176 // Signal to waiting threads that LoadNexeAndStart is complete (either 176 // Signal to waiting threads that LoadNexeAndStart is complete (either
177 // successfully or unsuccessfully). 177 // successfully or unsuccessfully).
178 void SignalNexeStarted(bool ok); 178 void SignalNexeStarted(bool ok);
179 179
180 // Establish an SrpcClient to the sel_ldr instance and load the nexe. 180 // Establish an SrpcClient to the sel_ldr instance and load the nexe.
Mark Seaborn 2014/06/30 20:01:04 "load" -> "start"
teravest 2014/06/30 22:04:57 Done.
181 // The nexe to be started is passed through |file_info|.
182 // This function must be called on the main thread. 181 // This function must be called on the main thread.
183 // This function must only be called once. 182 // This function must only be called once.
184 void LoadNexeAndStart(PP_NaClFileInfo file_info); 183 void LoadNexeAndStart();
185 184
186 // Starts the application channel to the nexe. 185 // Starts the application channel to the nexe.
187 SrpcClient* SetupAppChannel(); 186 SrpcClient* SetupAppChannel();
188 187
189 bool RemoteLog(int severity, const nacl::string& msg); 188 bool RemoteLog(int severity, const nacl::string& msg);
190 Plugin* plugin() const { return plugin_; } 189 Plugin* plugin() const { return plugin_; }
191 void Shutdown(); 190 void Shutdown();
192 191
193 // exit_status is -1 when invalid; when we set it, we will ensure 192 // exit_status is -1 when invalid; when we set it, we will ensure
194 // that it is non-negative (the portion of the exit status from the 193 // that it is non-negative (the portion of the exit status from the
195 // nexe that is transferred is the low 8 bits of the argument to the 194 // nexe that is transferred is the low 8 bits of the argument to the
196 // exit syscall). 195 // exit syscall).
197 int exit_status(); // const, but grabs mutex etc. 196 int exit_status(); // const, but grabs mutex etc.
198 void set_exit_status(int exit_status); 197 void set_exit_status(int exit_status);
199 198
200 nacl::string GetCrashLogOutput(); 199 nacl::string GetCrashLogOutput();
201 200
202 bool main_service_runtime() const { return main_service_runtime_; } 201 bool main_service_runtime() const { return main_service_runtime_; }
203 202
204 private: 203 private:
205 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); 204 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime);
206 bool LoadNexeAndStartInternal(const PP_NaClFileInfo& file_info); 205 bool LoadNexeAndStartInternal();
207 206
208 bool SetupCommandChannel(); 207 bool SetupCommandChannel();
209 bool InitReverseService(); 208 bool InitReverseService();
210 bool LoadModule(const PP_NaClFileInfo& file_info); 209 bool LoadModule(const PP_NaClFileInfo& file_info);
211 bool StartModule(); 210 bool StartModule();
212 void ReapLogs(); 211 void ReapLogs();
213 212
214 void ReportLoadError(const ErrorInfo& error_info); 213 void ReportLoadError(const ErrorInfo& error_info);
215 214
216 NaClSrpcChannel command_channel_; 215 NaClSrpcChannel command_channel_;
(...skipping 12 matching lines...) Expand all
229 NaClMutex mu_; 228 NaClMutex mu_;
230 NaClCondVar cond_; 229 NaClCondVar cond_;
231 bool start_sel_ldr_done_; 230 bool start_sel_ldr_done_;
232 bool start_nexe_done_; 231 bool start_nexe_done_;
233 bool nexe_started_ok_; 232 bool nexe_started_ok_;
234 }; 233 };
235 234
236 } // namespace plugin 235 } // namespace plugin
237 236
238 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ 237 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698