Summary: | WebKit2 can load the same plugin multiple times | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adam Roben (:aroben) <aroben> | ||||
Component: | Plug-ins | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, jhoneycutt, sam | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=164103 | ||||||
Attachments: |
|
Description
Adam Roben (:aroben)
2010-10-14 11:21:01 PDT
We could change how we load plugins to: 1) Collect all plugin paths from all directories 2) Put all the paths in a HashSet to get rid of duplicates 3) Load plugins specified in the HashSet On Windows, we'd probably want to use a case-insensitive HashSet. Created attachment 70763 [details]
Make sure WebKit2 only loads each plugin once
Comment on attachment 70763 [details] Make sure WebKit2 only loads each plugin once View in context: https://bugs.webkit.org/attachment.cgi?id=70763&action=review > WebKit2/UIProcess/Plugins/PluginInfoStore.cpp:59 > +template <typename T, typename U, typename V, typename W> > +static void addFromVector(HashSet<T, U, V>& hashSet, const W& vector) > +{ > + for (size_t i = 0; i < vector.size(); ++i) > + hashSet.add(vector[i]); > +} Should this be in HashSet.h? Comment on attachment 70763 [details] Make sure WebKit2 only loads each plugin once View in context: https://bugs.webkit.org/attachment.cgi?id=70763&action=review >> WebKit2/UIProcess/Plugins/PluginInfoStore.cpp:59 >> +} > > Should this be in HashSet.h? If we find it to be more generally useful we could put it there. Thanks for reviewing! Committed r69790: <http://trac.webkit.org/changeset/69790> |