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

Unified Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 332333003: Remove redundant use_nonsfi_mode from SelLdrStartParams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/src/trusted/plugin/plugin.cc
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc
index 2dffec6928d3d49a4332b71c774a189bdcaee6d1..7bb9cf884e6646bd9a45dc9519cf16efe8bbc0d6 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc
@@ -66,16 +66,17 @@ void Plugin::HistogramTimeSmall(const std::string& name,
kTimeSmallBuckets);
}
-bool Plugin::LoadNaClModuleFromBackgroundThread(
- PP_FileHandle file_handle,
- NaClSubprocess* subprocess,
- const SelLdrStartParams& params) {
+bool Plugin::LoadHelperNaClModule(PP_FileHandle file_handle,
+ NaClSubprocess* subprocess,
+ const SelLdrStartParams& params) {
CHECK(!pp::Module::Get()->core()->IsMainThread());
ServiceRuntime* service_runtime =
- new ServiceRuntime(this, false, uses_nonsfi_mode_,
+ new ServiceRuntime(this,
+ false, // No main_service_runtime.
+ false, // No non-SFI mode (i.e. in SFI-mode).
pp::BlockUntilComplete(), pp::BlockUntilComplete());
subprocess->set_service_runtime(service_runtime);
- PLUGIN_PRINTF(("Plugin::LoadNaClModuleFromBackgroundThread "
+ PLUGIN_PRINTF(("Plugin::LoadHelperNaClModule "
"(service_runtime=%p)\n",
static_cast<void*>(service_runtime)));
@@ -91,12 +92,11 @@ bool Plugin::LoadNaClModuleFromBackgroundThread(
sel_ldr_callback);
pp::Module::Get()->core()->CallOnMainThread(0, callback, 0);
if (!service_runtime->WaitForSelLdrStart()) {
- PLUGIN_PRINTF(("Plugin::LoadNaClModuleFromBackgroundThread "
+ PLUGIN_PRINTF(("Plugin::LoadHelperNaClModule "
"WaitForSelLdrStart timed out!\n"));
return false;
}
- PLUGIN_PRINTF(("Plugin::LoadNaClModuleFromBackgroundThread "
- "(service_runtime_started=%d)\n",
+ PLUGIN_PRINTF(("Plugin::LoadHelperNaClModule (service_runtime_started=%d)\n",
service_runtime_started));
if (!service_runtime_started)
return false;
@@ -170,14 +170,12 @@ void Plugin::LoadNaClModule(PP_NaClFileInfo file_info,
SelLdrStartParams params(manifest_base_url_str,
true /* uses_irt */,
true /* uses_ppapi */,
- uses_nonsfi_mode,
enable_dyncode_syscalls,
enable_exception_handling,
enable_crash_throttling);
ErrorInfo error_info;
- ServiceRuntime* service_runtime =
- new ServiceRuntime(this, true, uses_nonsfi_mode,
- init_done_cb, crash_cb);
+ ServiceRuntime* service_runtime = new ServiceRuntime(
+ this, true, uses_nonsfi_mode, init_done_cb, crash_cb);
main_subprocess_.set_service_runtime(service_runtime);
PLUGIN_PRINTF(("Plugin::LoadNaClModule (service_runtime=%p)\n",
static_cast<void*>(service_runtime)));
@@ -251,15 +249,13 @@ NaClSubprocess* Plugin::LoadHelperNaClModule(const nacl::string& helper_url,
SelLdrStartParams params(helper_url,
false /* uses_irt */,
false /* uses_ppapi */,
- false /* uses_nonsfi_mode */,
false /* enable_dyncode_syscalls */,
false /* enable_exception_handling */,
true /* enable_crash_throttling */);
// Helper NaCl modules always use the PNaCl manifest, as there is no
// corresponding NMF.
- if (!LoadNaClModuleFromBackgroundThread(file_handle, nacl_subprocess.get(),
- params)) {
+ if (!LoadHelperNaClModule(file_handle, nacl_subprocess.get(), params)) {
return NULL;
}
// We need not wait for the init_done callback. We can block
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.h ('k') | ppapi/native_client/src/trusted/plugin/service_runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698