Chromium Code Reviews| Index: ppapi/native_client/src/trusted/plugin/service_runtime.cc |
| diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc |
| index 7406e797a6b06217522fdc7f6b024e946febf2eb..3d669e6c8fc90e39fadf4ad468b798a6cb01aa73 100644 |
| --- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc |
| +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc |
| @@ -47,7 +47,6 @@ |
| #include "ppapi/cpp/core.h" |
| #include "ppapi/cpp/completion_callback.h" |
| -#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_resources.h" |
| @@ -120,13 +119,13 @@ const PP_ManifestService kManifestServiceVTable = { |
| PluginReverseInterface::PluginReverseInterface( |
| nacl::WeakRefAnchor* anchor, |
| Plugin* plugin, |
| - const Manifest* manifest, |
| + int32_t manifest_id, |
| ServiceRuntime* service_runtime, |
| pp::CompletionCallback init_done_cb, |
| pp::CompletionCallback crash_cb) |
| : anchor_(anchor), |
| plugin_(plugin), |
| - manifest_(manifest), |
| + manifest_id_(manifest_id), |
| service_runtime_(service_runtime), |
| shutting_down_(false), |
| init_done_cb_(init_done_cb), |
| @@ -259,18 +258,20 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation( |
| NaClLog(4, "Entered OpenManifestEntry_MainThreadContinuation\n"); |
| - std::string mapped_url; |
| + PP_Var pp_mapped_url; |
| PP_PNaClOptions pnacl_options = {PP_FALSE, PP_FALSE, 2}; |
| - if (!manifest_->ResolveKey(p->url, &mapped_url, &pnacl_options)) { |
| + if (!GetNaClInterface()->ManifestResolveKey( |
| + plugin_->pp_instance(), manifest_id_, p->url.c_str(), |
| + &pp_mapped_url, &pnacl_options)) { |
|
bbudge
2014/05/01 23:32:33
Are you using clang-format? Some of the indenting
teravest
2014/05/02 14:23:15
I've fixed up the formatting here.
|
| NaClLog(4, "OpenManifestEntry_MainThreadContinuation: ResolveKey failed\n"); |
| - // Failed, and error_info has the details on what happened. Wake |
| - // up requesting thread -- we are done. |
| + // Wake up requesting thread -- we are done. |
| nacl::MutexLocker take(&mu_); |
| *p->op_complete_ptr = true; // done... |
| p->file_info->desc = -1; // but failed. |
| NaClXCondVarBroadcast(&cv_); |
| return; |
| } |
| + nacl::string mapped_url = pp::Var(pp_mapped_url).AsString(); |
| NaClLog(4, |
| "OpenManifestEntry_MainThreadContinuation: " |
| "ResolveKey: %s -> %s (pnacl_translate(%d))\n", |
| @@ -456,7 +457,7 @@ void PluginReverseInterface::AddTempQuotaManagedFile( |
| } |
| ServiceRuntime::ServiceRuntime(Plugin* plugin, |
| - const Manifest* manifest, |
| + int32_t manifest_id, |
| bool main_service_runtime, |
| bool uses_nonsfi_mode, |
| pp::CompletionCallback init_done_cb, |
| @@ -467,7 +468,7 @@ ServiceRuntime::ServiceRuntime(Plugin* plugin, |
| reverse_service_(NULL), |
| anchor_(new nacl::WeakRefAnchor()), |
| rev_interface_(new PluginReverseInterface(anchor_, plugin, |
| - manifest, |
| + manifest_id, |
| this, |
| init_done_cb, crash_cb)), |
| exit_status_(-1), |