Plugins like Gnash, nspluginwrapper and Adobe Acrobat call NPN_UserAgent and NPN_GetValue (with variables NPNVxDisplay, NPNVToolkit and NPNVSupportsXEmbedBool) before a PluginView has been created. Right now we have no way of answering those queries, so the plugins fail to load.
*** Bug 18907 has been marked as a duplicate of this bug. ***
Created attachment 20998 [details] Preliminary patch for testing This is a preliminary attempt at fixing the bug. It adds two things: - An static version for NPN_UserAgent and NPN_GetValue for plugins that call those before any PluginView has been created. - More currentPluginView guards for plugins that call NPN_* functions without a proper instance when calling inside an NPP_* call, based on the existing patch for bug #18882.
Created attachment 21011 [details] Fixes loading plugins with NULL instance (r32972) This is mostly the same patch but with proper ChangeLog and ready for review. Thanks to Chris Lord, it should also fix bug #18882.
Created attachment 21034 [details] Modified patch for #18892 and #18882 Modified patch for style changes. I've also removed some stuff for dealing with Adobe Acrobat that I think will require a different bug and some more work.
Comment on attachment 21034 [details] Modified patch for #18892 and #18882 Yupp. Patch looks fine. I would like to land it in two parts. First the substance and then bringing these two files in line with our coding style. thanks!
Patch landed in r33570.