Skip to content
  • jhoneycutt@apple.com's avatar
    Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking · 721d8ace
    jhoneycutt@apple.com authored
    for the existence of a PluginHalterDelegate.
    
    This fixes a leak of WebPluginHalterClients:
    https://bugs.webkit.org/show_bug.cgi?id=30119.
    
    WebCore:
    
    Reviewed by Dan Bernstein.
    
    * WebCore.base.exp:
    Removed the export of WebCore::Settings::setPluginHalterEnabled().
    
    * loader/EmptyClients.h:
    (WebCore::EmptyPluginHalterClient::enabled):
    
    * page/Page.cpp:
    (WebCore::Page::Page):
    Remove initialization of m_pluginHalterClient, which was removed. If a
    non-null PluginHalterClient was passed, create the PluginHalter, and
    set its allowed run time.
    
    * page/Page.h:
    Removed pluginHalterEnabledStateChanged() and m_pluginHalterClient.
    
    * page/PluginHalter.cpp:
    (WebCore::PluginHalter::didStartPlugin):
    Check whether the PluginHalterClient is enabled.
    (WebCore::PluginHalter::didStopPlugin):
    Ditto.
    
    * page/PluginHalter.h:
    Made m_client an OwnPtr.
    
    * page/PluginHalterClient.h:
    Added a function to return the enabled state.
    
    * page/Settings.cpp:
    (WebCore::Settings::Settings):
    Remove initialization of removed member.
    
    * page/Settings.h:
    Removed settings for the enabled state of the PluginHalter; we now use
    the existence of a WebPluginHalterDelegate to determine whether the
    PluginHalter is enabled.
    
    WebKit/mac:
    
    * WebCoreSupport/WebPluginHalterClient.h:
    Add declaration for new function.
    
    * WebCoreSupport/WebPluginHalterClient.mm:
    (WebPluginHalterClient::enabled):
    Check whether the UIDelegate responds to shouldHaltPlugin.
    
    * WebView/WebPreferenceKeysPrivate.h:
    Remove the "enabled" preference key.
    
    * WebView/WebPreferences.mm:
    (+[WebPreferences initialize]):
    Remove the initialization of the pref.
    
    * WebView/WebPreferencesPrivate.h:
    Remove the getter/setter for this pref.
    
    * WebView/WebView.mm:
    (-[WebView _preferencesChangedNotification:]):
    Remove propagation of the pref.
    
    WebKit/win:
    
    * Interfaces/IWebPreferencesPrivate.idl:
    Remove the getter and setter.
    
    * WebCoreSupport/WebPluginHalterClient.cpp:
    (WebPluginHalterClient::enabled):
    Return true if the delegate exists.
    
    * WebCoreSupport/WebPluginHalterClient.h:
    Declare implementation of enabled().
    
    * WebPreferenceKeysPrivate.h:
    Removed the pref key.
    
    * WebPreferences.cpp:
    (WebPreferences::initializeDefaultSettings):
    Removed initialization of the pref.
    
    * WebPreferences.h:
    Removed declaration of the getter/setter.
    
    * WebView.cpp:
    (WebView::notifyPreferencesChanged):
    Don't propagate the pref.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    721d8ace