Bug 69139

Summary: [UNIX] Add a method to get information for an already loaded plugin module
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca
Priority: P2 Keywords: Gtk, Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 69123    
Attachments:
Description Flags
Patch mrobinson: review+

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]
Patch
Comment 2 Martin Robinson 2011-09-30 06:44:57 PDT
Comment on attachment 109265 [details]
Patch

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]
Patch

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>