Bug 18892 - [gtk][qt] Some NPAPI plugins need info before creating a PluginView
Summary: [gtk][qt] Some NPAPI plugins need info before creating a PluginView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: marcoil
URL:
Keywords: Gtk, Qt
: 18907 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-05 03:34 PDT by marcoil
Modified: 2008-05-19 03:15 PDT (History)
7 users (show)

See Also:


Attachments
Preliminary patch for testing (13.52 KB, patch)
2008-05-07 02:29 PDT, marcoil
no flags Details | Formatted Diff | Diff
Fixes loading plugins with NULL instance (r32972) (15.42 KB, patch)
2008-05-08 01:54 PDT, marcoil
no flags Details | Formatted Diff | Diff
Modified patch for #18892 and #18882 (23.31 KB, patch)
2008-05-09 03:14 PDT, marcoil
zecke: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description marcoil 2008-05-05 03:34:03 PDT
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.
Comment 1 Gwenole Beauchesne 2008-05-06 04:41:00 PDT
*** Bug 18907 has been marked as a duplicate of this bug. ***
Comment 2 marcoil 2008-05-07 02:29:25 PDT
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.
Comment 3 marcoil 2008-05-08 01:54:02 PDT
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.
Comment 4 marcoil 2008-05-09 03:14:47 PDT
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 5 Holger Freyther 2008-05-14 01:52:48 PDT
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!
Comment 6 marcoil 2008-05-19 03:15:13 PDT
Patch landed in r33570.