Index: ppapi/native_client/src/trusted/plugin/plugin.cc |
=================================================================== |
--- ppapi/native_client/src/trusted/plugin/plugin.cc (revision 114029) |
+++ ppapi/native_client/src/trusted/plugin/plugin.cc (working copy) |
@@ -988,6 +988,7 @@ |
nacl_ready_state_(UNSENT), |
nexe_error_reported_(false), |
wrapper_factory_(NULL), |
+ pnacl_(NULL), |
last_error_string_(""), |
ppapi_proxy_(NULL), |
enable_dev_interfaces_(false), |
@@ -1000,9 +1001,8 @@ |
PLUGIN_PRINTF(("Plugin::Plugin (this=%p, pp_instance=%" |
NACL_PRId32")\n", static_cast<void*>(this), pp_instance)); |
NaClSrpcModuleInit(); |
+ callback_factory_.Initialize(this); |
nexe_downloader_.Initialize(this); |
- pnacl_.Initialize(this); |
- callback_factory_.Initialize(this); |
} |
@@ -1305,7 +1305,7 @@ |
// Inform JavaScript that we successfully translated the bitcode to a nexe. |
EnqueueProgressEvent(kProgressEventProgress); |
nacl::scoped_ptr<nacl::DescWrapper> |
- wrapper(pnacl_.ReleaseTranslatedFD()); |
+ wrapper(pnacl_->ReleaseTranslatedFD()); |
ErrorInfo error_info; |
bool was_successful = LoadNaClModule( |
wrapper.get(), &error_info, |
@@ -1621,7 +1621,9 @@ |
pp::CompletionCallback translate_callback = |
callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate); |
// Will always call the callback on success or failure. |
robertm
2011/12/13 17:06:39
it might be useful for debugging to issue
Progres
sehr (please use chromium)
2011/12/13 20:05:04
There are tests that rely on how many progress eve
|
- pnacl_.BitcodeToNative(program_url, translate_callback); |
+ pnacl_ = PnaclCoordinator::BitcodeToNative(this, |
robertm
2011/12/13 17:06:39
is this overwritten every time?
maybe use a scoped
sehr (please use chromium)
2011/12/13 20:05:04
Used a scoped_ptr. The ugly thing is I think NaCl
|
+ program_url, |
+ translate_callback); |
return; |
} else { |
pp::CompletionCallback open_callback = |