Changeset 86456 in webkit


Ignore:
Timestamp:
May 13, 2011 12:54:33 PM (13 years ago)
Author:
Adam Roben
Message:

Load plugins in the order they're found

Fixes <http://webkit.org/b/60788> <rdar://problem/9435787> REGRESSION (r69790): WebKit2
doesn't prefer plugins in the additional plugins directory

Reviewed by Anders Carlsson.

  • UIProcess/Plugins/PluginInfoStore.cpp:

(WebKit::addFromVector):
Changed to use a ListHashSet instead of a HashSet to store the plugin paths.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r86451 r86456  
     12011-05-13  Adam Roben  <aroben@apple.com>
     2
     3        Load plugins in the order they're found
     4
     5        Fixes <http://webkit.org/b/60788> <rdar://problem/9435787> REGRESSION (r69790): WebKit2
     6        doesn't prefer plugins in the additional plugins directory
     7
     8        Reviewed by Anders Carlsson.
     9
     10        * UIProcess/Plugins/PluginInfoStore.cpp:
     11        (WebKit::addFromVector):
     12        Changed to use a ListHashSet instead of a HashSet to store the plugin paths.
     13
    1142011-05-13  Sam Weinig  <sam@webkit.org>
    215
  • trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp

    r85983 r86456  
    3030#include <WebCore/MIMETypeRegistry.h>
    3131#include <algorithm>
     32#include <wtf/ListHashSet.h>
    3233#include <wtf/StdLibExtras.h>
    3334
     
    5354}
    5455
    55 template <typename T, typename U, typename V, typename W>
    56 static void addFromVector(HashSet<T, U, V>& hashSet, const W& vector)
     56template <typename T, typename U>
     57static void addFromVector(T& hashSet, const U& vector)
    5758{
    5859    for (size_t i = 0; i < vector.size(); ++i)
     
    6061}
    6162
     63// We use a ListHashSet so that plugins will be loaded from the additional plugins directories first
     64// (which in turn means those plugins will be preferred if two plugins claim the same MIME type).
    6265#if OS(WINDOWS)
    63 typedef HashSet<String, CaseFoldingHash> PathHashSet;
     66typedef ListHashSet<String, 32, CaseFoldingHash> PathHashSet;
    6467#else
    65 typedef HashSet<String> PathHashSet;
     68typedef ListHashSet<String, 32> PathHashSet;
    6669#endif
    6770
Note: See TracChangeset for help on using the changeset viewer.