Bug 69139 - [UNIX] Add a method to get information for an already loaded plugin module
Summary: [UNIX] Add a method to get information for an already loaded plugin module
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Keywords: Gtk, Qt
Depends on:
Blocks: 69123
  Show dependency treegraph
Reported: 2011-09-30 01:30 PDT by Carlos Garcia Campos
Modified: 2011-09-30 07:22 PDT (History)
1 user (show)

See Also:

Patch (4.81 KB, patch)
2011-09-30 01:36 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-09-30 01:30:12 PDT
NetscapePluginModule::getPluginInfo() crashes when called from determineQuirks(). The problem is that determineQuirks() is called when loading a plugin module. Since getPluginInfo() is a static method, when called from determineQuirks() it tries to get or load the plugin module again, the module is now loaded but determineQuirks is called again recursively. A solution to this problem could be adding a private method to get the plugin info for a module already loaded that can be called from determineQuirks.
Comment 1 Carlos Garcia Campos 2011-09-30 01:36:56 PDT
Created attachment 109265 [details]
Comment 2 Martin Robinson 2011-09-30 06:44:57 PDT
Comment on attachment 109265 [details]

Instead of adding getPluginInfo along with pluginInfo, I think it would be safer to ensure that getPluginInfo is safe to call at any time. I say this because it seems to work on Windows and Mac. If the other ports are making that assumption we should try to match it.
Comment 3 Carlos Garcia Campos 2011-09-30 07:01:13 PDT
Other ports don't need to call NetscapePluginModule::getOrCreate() in getPluginInfo(), they use the plugin path directly. We need load the module to get the information.
Comment 4 Martin Robinson 2011-09-30 07:12:35 PDT
Comment on attachment 109265 [details]

Hrm. I took another look and I think your method is cleaner than adapting getPluginInfo to allow recursive calls. I think the danger of that happening is pretty low.
Comment 5 Carlos Garcia Campos 2011-09-30 07:22:52 PDT
Committed r96400: <http://trac.webkit.org/changeset/96400>