[Webkit-unassigned] [Bug 43510] WebKit2 should load plugins from the same directories as old-WebKit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 19 13:47:53 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43510


Ada Chan <adachan at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adachan at apple.com




--- Comment #5 from Ada Chan <adachan at apple.com>  2010-08-19 13:47:53 PST ---
> +static inline void addMozillaPluginDirectories(Vector<String>& directories)
> +{
> +    // Enumerate all Mozilla plugin directories in the registry
> +    HKEY key;
> +    LONG result = ::RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Mozilla", 0, KEY_READ, &key);
> +    if (result == ERROR_SUCCESS) {

Maybe we can return early if result != ERROR_SUCCESS?

> +        WCHAR name[128];
> +        FILETIME lastModified;
> +
> +        // Enumerate subkeys
> +        for (int i = 0;; i++) {
> +            DWORD nameLen = sizeof(name) / sizeof(WCHAR);

I saw you used _countof in an earlier method.  Can it be used above also?

> +static inline void addAdobeAcrobatPluginDirectory(Vector<String>& directories)
> +{
> +    HKEY key;
> +    HRESULT result = ::RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Adobe\\Acrobat Reader", 0, KEY_READ, &key);
> +    if (result != ERROR_SUCCESS)
> +        return;
> +
> +    WCHAR name[128];
> +    FILETIME lastModified;
> +
> +    Vector<int> latestAcrobatVersion;
> +    String latestAcrobatVersionString;
> +
> +    // Enumerate subkeys
> +    for (int i = 0;; i++) {
> +        DWORD nameLen = sizeof(name) / sizeof(WCHAR);

Ditto

> +static inline void addMacromediaPluginDirectories(Vector<String>& directories)
> +{
> +#if !OS(WINCE)
> +    WCHAR systemDirectoryStr[MAX_PATH];
> +
> +    if (::GetSystemDirectoryW(systemDirectoryStr, _countof(systemDirectoryStr)) == 0)
> +        return;

Should we use ! instead of == 0?

> +
> +    WCHAR macromediaDirectoryStr[MAX_PATH];
> +
> +    ::PathCombineW(macromediaDirectoryStr, systemDirectoryStr, L"macromed\\Flash");

Should we check the return value of PathCombine?

> +    directories.append(macromediaDirectoryStr);
> +
> +    ::PathCombineW(macromediaDirectoryStr, systemDirectoryStr, L"macromed\\Shockwave 10");

Ditto.

> +    directories.append(macromediaDirectoryStr);
> +#endif
> +}

r=me too!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list