Changeset 241933 in webkit


Ignore:
Timestamp:
Feb 21, 2019 11:02:05 PM (5 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Epiphany searching for plugins even if plugins are disabled
https://bugs.webkit.org/show_bug.cgi?id=194352

Reviewed by Michael Catanzaro.

Check pluginsEnabled setting before trying to get plugins from UI process.

  • WebProcess/Plugins/WebPluginInfoProvider.cpp:

(WebKit::WebPluginInfoProvider::populatePluginCache):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r241932 r241933  
     12019-02-21  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Epiphany searching for plugins even if plugins are disabled
     4        https://bugs.webkit.org/show_bug.cgi?id=194352
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Check pluginsEnabled setting before trying to get plugins from UI process.
     9
     10        * WebProcess/Plugins/WebPluginInfoProvider.cpp:
     11        (WebKit::WebPluginInfoProvider::populatePluginCache):
     12
    1132019-02-21  Darin Adler  <darin@apple.com>
    214
  • trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp

    r241844 r241933  
    3737#include <WebCore/Page.h>
    3838#include <WebCore/SchemeRegistry.h>
     39#include <WebCore/Settings.h>
    3940#include <WebCore/SubframeLoader.h>
    4041#include <wtf/text/StringHash.h>
     
    147148{
    148149    if (!m_pluginCacheIsPopulated) {
    149         HangDetectionDisabler hangDetectionDisabler;
    150 
    151         if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins),
    152             Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins, m_cachedSupportedPluginIdentifiers), 0))
    153             return;
     150#if PLATFORM(COCOA)
     151        // Application plugins are not affected by enablePlugins setting, so we always need to scan plugins to get them.
     152        bool shouldScanPlugins = true;
     153#else
     154        bool shouldScanPlugins = page.mainFrame().loader().subframeLoader().allowPlugins();
     155#endif
     156        if (shouldScanPlugins) {
     157            HangDetectionDisabler hangDetectionDisabler;
     158            if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins),
     159                Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins, m_cachedSupportedPluginIdentifiers), 0))
     160                return;
     161        }
    154162
    155163        m_shouldRefreshPlugins = false;
Note: See TracChangeset for help on using the changeset viewer.