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

Unified Diff: webkit/glue/plugins/plugin_host.cc

Issue 2885004: Linux: Blind fix for npwrapper crashes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_host.cc
===================================================================
--- webkit/glue/plugins/plugin_host.cc (revision 51072)
+++ webkit/glue/plugins/plugin_host.cc (working copy)
@@ -569,7 +569,8 @@
}
if (use_mozilla_user_agent)
- return "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061103 Firefox/2.0a1";
+ return "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) "
+ "Gecko/20061103 Firefox/2.0a1";
#elif defined(OS_MACOSX)
// Silverlight 4 doesn't handle events correctly unless we claim to be Safari.
scoped_refptr<NPAPI::PluginInstance> plugin;
@@ -705,6 +706,10 @@
#if !defined(OS_MACOSX) // OS X doesn't have windowed plugins.
case NPNVnetscapeWindow: {
scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (!plugin.get()) {
+ NOTREACHED();
+ return NPERR_GENERIC_ERROR;
+ }
gfx::PluginWindowHandle handle = plugin->window_handle();
*((void**)value) = (void*)handle;
rv = NPERR_NO_ERROR;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698