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

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 103623003: Instrument pepper plugin load failures. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years 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: content/browser/ppapi_plugin_process_host.cc
===================================================================
--- content/browser/ppapi_plugin_process_host.cc (revision 238091)
+++ content/browser/ppapi_plugin_process_host.cc (working copy)
@@ -117,6 +117,7 @@
const base::FilePath& profile_data_directory) {
PpapiPluginProcessHost* plugin_host = new PpapiPluginProcessHost(
info, profile_data_directory);
+ CHECK(plugin_host);
piman 2013/12/09 22:39:06 nit: DCHECK
Scott Hess - ex-Googler 2013/12/09 23:47:45 Wouldn't NULL be obvious from the crash reports an
ilja 2013/12/10 05:55:31 Done.
ilja 2013/12/10 05:55:31 It has virtuals, so it should crash when accessing
if (plugin_host->Init(info))
return plugin_host;
@@ -253,8 +254,10 @@
}
std::string channel_id = process_->GetHost()->CreateChannel();
- if (channel_id.empty())
+ if (channel_id.empty()) {
+ LOG(ERROR) << "Could not create pepper host channel.";
return false;
+ }
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
CommandLine::StringType plugin_launcher =
@@ -267,8 +270,10 @@
int flags = ChildProcessHost::CHILD_NORMAL;
#endif
base::FilePath exe_path = ChildProcessHost::GetChildPath(flags);
- if (exe_path.empty())
+ if (exe_path.empty()) {
+ LOG(ERROR) << "Pepper plugin exe path is empty.";
return false;
+ }
CommandLine* cmd_line = new CommandLine(exe_path);
cmd_line->AppendSwitchASCII(switches::kProcessType,
@@ -361,6 +366,7 @@
}
void PpapiPluginProcessHost::OnProcessCrashed(int exit_code) {
+ LOG(WARNING) << "ppapi plugin process crashed.";
PluginServiceImpl::GetInstance()->RegisterPluginCrash(plugin_path_);
}
@@ -391,6 +397,7 @@
// Called when the browser <--> plugin channel has an error. This normally
// means the plugin has crashed.
void PpapiPluginProcessHost::OnChannelError() {
+ LOG(WARNING) << "ppapi plugin channel error.";
DVLOG(1) << "PpapiPluginProcessHost" << (is_broker_ ? "[broker]" : "")
<< "::OnChannelError()";
// We don't need to notify the renderers that were communicating with the

Powered by Google App Engine
This is Rietveld 408576698