diff options
author | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-16 01:32:02 +0000 |
---|---|---|
committer | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-16 01:32:02 +0000 |
commit | cdcd85afca4679b9078c3fac01f84e2c3fc947f1 (patch) | |
tree | c19fef43528df9d0d91729a03952ce3de4e98b2c /ppapi/native_client | |
parent | de6831b6677d817f76387c0e489c9c4781e21260 (diff) | |
download | chromium_src-cdcd85afca4679b9078c3fac01f84e2c3fc947f1.zip chromium_src-cdcd85afca4679b9078c3fac01f84e2c3fc947f1.tar.gz chromium_src-cdcd85afca4679b9078c3fac01f84e2c3fc947f1.tar.bz2 |
Remove pnacl-translate for NMF entries via reverse service for shared libs.
This was added a while back to translate PSO files before
loading the PSO dynamic libraries. However, PNaCl + dynamic
linking isn't supported yet, isn't maintained, and the
"irt-resource-open" API that hits this reverse service is
disabled for PNaCl anyway.
Simplify things in case this comes up in trusted plugin
refactoring.
Cleanup from:
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2366
R=dschuff@chromium.org
Review URL: https://codereview.chromium.org/68893027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235484 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/service_runtime.cc | 64 | ||||
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/service_runtime.h | 7 |
2 files changed, 14 insertions, 57 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc index 8f59f3a..5b678b9 100644 --- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc @@ -50,7 +50,7 @@ #include "ppapi/native_client/src/trusted/plugin/manifest.h" #include "ppapi/native_client/src/trusted/plugin/plugin.h" #include "ppapi/native_client/src/trusted/plugin/plugin_error.h" -#include "ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h" +#include "ppapi/native_client/src/trusted/plugin/pnacl_options.h" #include "ppapi/native_client/src/trusted/plugin/pnacl_resources.h" #include "ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h" #include "ppapi/native_client/src/trusted/plugin/srpc_client.h" @@ -313,9 +313,9 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation( plugin_, PnaclUrls::PnaclComponentURLToFilename(mapped_url).c_str()); if (fd < 0) { - // We should check earlier if the pnacl component wasn't installed - // yet. At this point, we can't do much anymore, so just continue - // with an invalid fd. + // We checked earlier if the pnacl component wasn't installed + // yet, so this shouldn't happen. At this point, we can't do much + // anymore, so just continue with an invalid fd. NaClLog(4, "OpenManifestEntry_MainThreadContinuation: " "GetReadonlyPnaclFd failed\n"); @@ -333,22 +333,18 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation( "OpenManifestEntry_MainThreadContinuation: GetPnaclFd okay\n"); } } else { - // Requires PNaCl translation. + // Requires PNaCl translation, but that's not supported. NaClLog(4, "OpenManifestEntry_MainThreadContinuation: " - "pulling down and translating.\n"); - pp::CompletionCallback translate_callback = - WeakRefNewCallback( - anchor_, - this, - &PluginReverseInterface::BitcodeTranslate_MainThreadContinuation, - open_cont); - // Will always call the callback on success or failure. - pnacl_coordinator_.reset( - PnaclCoordinator::BitcodeToNative(plugin_, - mapped_url, - pnacl_options, - translate_callback)); + "Requires PNaCl translation -- not supported\n"); + nacl::MutexLocker take(&mu_); + *p->op_complete_ptr = true; // done... + p->file_info->desc = -1; // but failed. + p->error_info->SetReport( + ERROR_MANIFEST_OPEN, + "ServiceRuntime: Translating OpenManifestEntry files not supported"); + NaClXCondVarBroadcast(&cv_); + return; } // p is deleted automatically } @@ -379,38 +375,6 @@ void PluginReverseInterface::StreamAsFile_MainThreadContinuation( NaClXCondVarBroadcast(&cv_); } - -void PluginReverseInterface::BitcodeTranslate_MainThreadContinuation( - OpenManifestEntryResource* p, - int32_t result) { - NaClLog(4, - "Entered BitcodeTranslate_MainThreadContinuation\n"); - - nacl::MutexLocker take(&mu_); - if (result == PP_OK) { - // TODO(jvoung): clean this up. We are assuming that the NaClDesc is - // a host IO desc and doing a downcast. Once the ReverseInterface - // accepts NaClDescs we can avoid this downcast. - NaClDesc* desc = pnacl_coordinator_->ReleaseTranslatedFD()->desc(); - struct NaClDescIoDesc* ndiodp = (struct NaClDescIoDesc*)desc; - p->file_info->desc = ndiodp->hd->d; - pnacl_coordinator_.reset(NULL); - NaClLog(4, - "BitcodeTranslate_MainThreadContinuation: PP_OK, desc %d\n", - p->file_info->desc); - } else { - NaClLog(4, - "BitcodeTranslate_MainThreadContinuation: !PP_OK, " - "setting desc -1\n"); - p->file_info->desc = -1; - // Error should have been reported by pnacl coordinator. - NaClLog(LOG_ERROR, "PluginReverseInterface::BitcodeTranslate error.\n"); - } - *p->op_complete_ptr = true; - NaClXCondVarBroadcast(&cv_); -} - - bool PluginReverseInterface::CloseManifestEntry(int32_t desc) { bool op_complete = false; bool op_result; diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.h b/ppapi/native_client/src/trusted/plugin/service_runtime.h index b06a706..7f6f198 100644 --- a/ppapi/native_client/src/trusted/plugin/service_runtime.h +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.h @@ -42,7 +42,6 @@ namespace plugin { class ErrorInfo; class Manifest; class Plugin; -class PnaclCoordinator; class SrpcClient; class ServiceRuntime; @@ -201,10 +200,6 @@ class PluginReverseInterface: public nacl::ReverseInterface { OpenManifestEntryResource* p, int32_t result); - virtual void BitcodeTranslate_MainThreadContinuation( - OpenManifestEntryResource* p, - int32_t result); - virtual void CloseManifestEntry_MainThreadContinuation( CloseManifestEntryResource* cls, int32_t err); @@ -220,8 +215,6 @@ class PluginReverseInterface: public nacl::ReverseInterface { std::set<int64_t> quota_files_; bool shutting_down_; - nacl::scoped_ptr<PnaclCoordinator> pnacl_coordinator_; - pp::CompletionCallback init_done_cb_; pp::CompletionCallback crash_cb_; }; |