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

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

Issue 7741036: NaCl PPAPI Proxy: wrap up with crash detection. Clean-up handling code to skip remote shutdown ca... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
===================================================================
--- ppapi/native_client/src/trusted/plugin/plugin.cc (revision 98327)
+++ ppapi/native_client/src/trusted/plugin/plugin.cc (working copy)
@@ -472,7 +472,7 @@
}
bool Plugin::HasMethod(uintptr_t method_id, CallType call_type) {
- PLUGIN_PRINTF(("Plugin::HasMethod (method_id=%x) = ",
+ PLUGIN_PRINTF(("Plugin::HasMethod (method_id=%x)\n",
static_cast<int>(method_id)));
if (GetMethodInfo(method_id, call_type)) {
PLUGIN_PRINTF(("true\n"));
@@ -1305,6 +1305,8 @@
void Plugin::ReportDeadNexe() {
PLUGIN_PRINTF(("Plugin::ReportDeadNexe\n"));
+ if (ppapi_proxy_ != NULL)
+ ppapi_proxy_->ReportDeadNexe();
if (nacl_ready_state() == DONE) { // After loadEnd.
int64_t crash_time = NaClGetTimeOfDayMicroseconds();
@@ -1321,7 +1323,9 @@
CHECK(ppapi_proxy_ != NULL && !ppapi_proxy_->is_valid());
ShutdownProxy();
}
- // else LoadNaClModule and NexeFileDidOpen will provide error handling.
+ // else ReportLoadError() and ReportAbortError() will be used by loading code
+ // to provide error handling and proxy shutdown.
+ //
// NOTE: not all crashes during load will make it here.
// Those in BrowserPpp::InitializeModule and creation of PPP interfaces
// will just get reported back as PP_ERROR_FAILED.
@@ -1333,10 +1337,11 @@
// We do not call remote PPP_Instance::DidDestroy because the untrusted
// side can no longer take full advantage of mostly asynchronous Pepper
// per-Instance interfaces at this point.
- if (BrowserPpp::is_valid(ppapi_proxy_))
+ if (ppapi_proxy_ != NULL) {
ppapi_proxy_->ShutdownModule();
- delete ppapi_proxy_;
- ppapi_proxy_ = NULL;
+ delete ppapi_proxy_;
+ ppapi_proxy_ = NULL;
+ }
}
void Plugin::NaClManifestBufferReady(int32_t pp_error) {

Powered by Google App Engine
This is Rietveld 408576698