When out-of-process PPAPI plugins fail to initialize, don't fall back on trying
to load them as NPAPI.
BUG=78115
Review URL: http://codereview.chromium.org/6771057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80317 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
index d0cf681a..e2d2441 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -847,10 +847,15 @@
if (!found || !webkit::npapi::IsPluginEnabled(info))
return NULL;
+ bool pepper_plugin_was_registered = false;
scoped_refptr<webkit::ppapi::PluginModule> pepper_module(
- pepper_delegate_.CreatePepperPlugin(info.path));
- if (pepper_module)
- return CreatePepperPlugin(frame, params, info.path, pepper_module.get());
+ pepper_delegate_.CreatePepperPlugin(info.path,
+ &pepper_plugin_was_registered));
+ if (pepper_plugin_was_registered) {
+ if (pepper_module)
+ return CreatePepperPlugin(frame, params, info.path, pepper_module.get());
+ return NULL;
+ }
return CreateNPAPIPlugin(frame, params, info.path, mime_type);
}