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

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

Issue 793723006: Revert of NaCl: Remove reliance on "init_done" SRPC call in the non-PNaCl case (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 177b3ce62ed7f6904d907cebc5bc8a9e1d5a9498..31be5e2b78013786a6eb8b38b6eaf14afa3a59f9 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc
@@ -309,8 +309,22 @@
nexe_file_info_,
uses_nonsfi_mode_,
PP_NATIVE_NACL_PROCESS_TYPE,
- // No-op callback.
- pp::CompletionCallback());
+ callback_factory_.NewCallback(&Plugin::NexeFileDidOpenContinuation));
+}
+
+void Plugin::NexeFileDidOpenContinuation(int32_t pp_error) {
+ UNREFERENCED_PARAMETER(pp_error);
+ NaClLog(4, "Entered NexeFileDidOpenContinuation\n");
+ if (LoadNaClModuleContinuationIntern()) {
+ NaClLog(4, "NexeFileDidOpenContinuation: success;"
+ " setting histograms\n");
+ int64_t nexe_size = nacl_interface_->GetNexeSize(pp_instance());
+ nacl_interface_->ReportLoadSuccess(
+ pp_instance(), nexe_size, nexe_size);
+ } else {
+ NaClLog(4, "NexeFileDidOpenContinuation: failed.");
+ }
+ NaClLog(4, "Leaving NexeFileDidOpenContinuation\n");
}
void Plugin::BitcodeDidTranslate(int32_t pp_error) {
@@ -335,12 +349,6 @@
callback_factory_.NewCallback(&Plugin::BitcodeDidTranslateContinuation));
}
-// This is the only code path that responds to the
-// "init_done"/StartupInitializationComplete() SRPC call, which now has an
-// effect for PNaCl only.
-// TODO(mseaborn): Switch to doing this ReportLoadSuccess() call via the
-// Chrome-IPC-based StartupInitializationComplete() handler in
-// ppb_nacl_private_impl.cc, to match the non-PNaCl cases.
void Plugin::BitcodeDidTranslateContinuation(int32_t pp_error) {
NaClLog(4, "Entered BitcodeDidTranslateContinuation\n");
UNREFERENCED_PARAMETER(pp_error);
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698