Bug 49075

Summary: WebKit2 will load two copies of the same plugin, but should not
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Plug-insAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, jhoneycutt, sfalken
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 58276    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch aroben: review+

Description Adam Roben (:aroben) 2010-11-05 10:27:10 PDT
WebKit2 will load two different versions of the same plugin. For example, if you have both Shockwave Director 10.3 and 11.5 installed, WebKit2 will load them both. But we should only load the newer one.
Comment 1 Adam Roben (:aroben) 2010-11-05 10:27:37 PDT
<rdar://problem/8635947>
Comment 2 Adam Roben (:aroben) 2011-04-12 05:05:07 PDT
*** Bug 58276 has been marked as a duplicate of this bug. ***
Comment 3 Adam Roben (:aroben) 2011-04-12 05:11:23 PDT
*** Bug 58276 has been marked as a duplicate of this bug. ***
Comment 4 Steve Falkenburg 2011-04-13 12:17:02 PDT
Even if the plug-in is the same version, we can end up loading two copies if Windows path redirection comes into play (SysWOW64 vs. System32 for example).
Comment 5 Steve Falkenburg 2011-04-13 14:32:58 PDT
Created attachment 89461 [details]
Patch
Comment 6 Steve Falkenburg 2011-04-13 14:38:30 PDT
Committed r83769: <http://trac.webkit.org/changeset/83769>
Comment 7 Adam Roben (:aroben) 2011-04-13 14:44:55 PDT
Comment on attachment 89461 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=89461&action=review

> Source/WebKit2/UIProcess/Plugins/win/PluginInfoStoreWin.cpp:396
> +    String pluginPath = plugin.path;
> +    String pluginFileName(::PathFindFileNameW(pluginPath.charactersWithNullTermination()));

You can use pathGetFileName from WebCore/FileSystem.h.

> Source/WebKit2/UIProcess/Plugins/win/PluginInfoStoreWin.cpp:401
> +        String loadedPluginFileName(::PathFindFileNameW(loadedPlugin.path.charactersWithNullTermination()));

Ditto.
Comment 8 Steve Falkenburg 2011-04-13 15:07:22 PDT
Created attachment 89471 [details]
Patch
Comment 9 Steve Falkenburg 2011-04-13 15:11:41 PDT
Committed r83772: <http://trac.webkit.org/changeset/83772>