Bug 49075 - WebKit2 will load two copies of the same plugin, but should not
Summary: WebKit2 will load two copies of the same plugin, but should not
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 58276 (view as bug list)
Depends on: 58276
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-05 10:27 PDT by Adam Roben (:aroben)
Modified: 2011-04-13 15:11 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.23 KB, patch)
2011-04-13 14:32 PDT, Steve Falkenburg
no flags Details | Formatted Diff | Diff
Patch (2.03 KB, patch)
2011-04-13 15:07 PDT, Steve Falkenburg
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>