[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

jhoneycutt at apple.com jhoneycutt at apple.com
Thu Oct 29 20:42:22 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 721d8ace91cf24ba7a0ac157c3425698e1bf3f00
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 9 09:36:40 2009 +0000

    Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
    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

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2c17eef..80b41ad 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,49 @@
+2009-10-08  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
+        for the existence of a PluginHalterDelegate.
+
+        This fixes a leak of WebPluginHalterClients:
+        https://bugs.webkit.org/show_bug.cgi?id=30119.
+
+        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.
+
 2009-10-08  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/WebCore.base.exp b/WebCore/WebCore.base.exp
index f9e156e..2995b72 100644
--- a/WebCore/WebCore.base.exp
+++ b/WebCore/WebCore.base.exp
@@ -973,7 +973,6 @@ __ZTVN7WebCore25HistoryPropertyListWriterE
 __ZN7WebCore4Page13didStopPluginEPNS_14HaltablePluginE
 __ZN7WebCore4Page14didStartPluginEPNS_14HaltablePluginE
 __ZN7WebCore8Settings23setPluginAllowedRunTimeEj
-__ZN7WebCore8Settings22setPluginHalterEnabledEb
 _filenameByFixingIllegalCharacters
 _hasCaseInsensitiveSubstring
 _hasCaseInsensitiveSuffix
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index 14d36f1..91c7030 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -488,6 +488,7 @@ class EmptyPluginHalterClient : public PluginHalterClient
 {
 public:
     virtual bool shouldHaltPlugin(Node*) const { return false; }
+    virtual bool enabled() const { return false; }
 };
 
 }
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index 397cb72..f0600e4 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -137,7 +137,6 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
     , m_customHTMLTokenizerTimeDelay(-1)
     , m_customHTMLTokenizerChunkSize(-1)
     , m_canStartPlugins(true)
-    , m_pluginHalterClient(pluginHalterClient)
 {
 #if !ENABLE(CONTEXT_MENUS)
     UNUSED_PARAM(contextMenuClient);
@@ -157,7 +156,10 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
     ASSERT(!allPages->contains(this));
     allPages->add(this);
 
-    pluginHalterEnabledStateChanged();
+    if (pluginHalterClient) {
+        m_pluginHalter.set(new PluginHalter(pluginHalterClient));
+        m_pluginHalter->setPluginAllowedRunTime(m_settings->pluginAllowedRunTime());
+    }
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
     JavaScriptDebugServer::shared().pageCreated(this);
@@ -733,16 +735,6 @@ InspectorTimelineAgent* Page::inspectorTimelineAgent() const
 }
 #endif
 
-void Page::pluginHalterEnabledStateChanged()
-{
-    if (m_settings->pluginHalterEnabled()) {
-        ASSERT(!m_pluginHalter);
-        m_pluginHalter.set(new PluginHalter(m_pluginHalterClient));
-        m_pluginHalter->setPluginAllowedRunTime(m_settings->pluginAllowedRunTime());
-    } else
-        m_pluginHalter = 0;
-}
-
 void Page::pluginAllowedRunTimeChanged()
 {
     if (m_pluginHalter)
diff --git a/WebCore/page/Page.h b/WebCore/page/Page.h
index cab075e..4886464 100644
--- a/WebCore/page/Page.h
+++ b/WebCore/page/Page.h
@@ -193,7 +193,6 @@ namespace WebCore {
         void didStartPlugin(HaltablePlugin*);
         void didStopPlugin(HaltablePlugin*);
         void pluginAllowedRunTimeChanged();
-        void pluginHalterEnabledStateChanged();
 
         static void setDebuggerForAllPages(JSC::Debugger*);
         void setDebugger(JSC::Debugger*);
@@ -300,7 +299,6 @@ namespace WebCore {
         HashSet<PluginView*> m_unstartedPlugins;
 
         OwnPtr<PluginHalter> m_pluginHalter;
-        PluginHalterClient* m_pluginHalterClient;
 
 #if ENABLE(DOM_STORAGE)
         RefPtr<StorageNamespace> m_sessionStorage;
diff --git a/WebCore/page/PluginHalter.cpp b/WebCore/page/PluginHalter.cpp
index 8025337..63f5469 100644
--- a/WebCore/page/PluginHalter.cpp
+++ b/WebCore/page/PluginHalter.cpp
@@ -28,7 +28,6 @@
 #include "PluginHalter.h"
 
 #include "HaltablePlugin.h"
-#include "PluginHalterClient.h"
 #include <wtf/CurrentTime.h>
 #include <wtf/Vector.h>
 
@@ -49,6 +48,9 @@ void PluginHalter::didStartPlugin(HaltablePlugin* obj)
     ASSERT_ARG(obj, obj);
     ASSERT_ARG(obj, !m_plugins.contains(obj));
 
+    if (!m_client->enabled())
+        return;
+
     double currentTime = WTF::currentTime();
 
     m_plugins.add(obj, currentTime);
@@ -61,6 +63,9 @@ void PluginHalter::didStartPlugin(HaltablePlugin* obj)
 
 void PluginHalter::didStopPlugin(HaltablePlugin* obj)
 {
+    if (!m_client->enabled())
+        return;
+
     m_plugins.remove(obj);
 }
 
diff --git a/WebCore/page/PluginHalter.h b/WebCore/page/PluginHalter.h
index 26f5101..eddce34 100644
--- a/WebCore/page/PluginHalter.h
+++ b/WebCore/page/PluginHalter.h
@@ -26,13 +26,14 @@
 #ifndef PluginHalter_h
 #define PluginHalter_h
 
+#include "PluginHalterClient.h"
 #include "Timer.h"
 #include <wtf/HashMap.h>
+#include <wtf/OwnPtr.h>
 
 namespace WebCore {
 
 class HaltablePlugin;
-class PluginHalterClient;
 
 class PluginHalter {
 public:
@@ -47,7 +48,7 @@ private:
     void timerFired(Timer<PluginHalter>*);
     void startTimerIfNecessary();
 
-    PluginHalterClient* m_client;
+    OwnPtr<PluginHalterClient> m_client;
     Timer<PluginHalter> m_timer;
     unsigned m_pluginAllowedRunTime;
     double m_oldestStartTime;
diff --git a/WebCore/page/PluginHalterClient.h b/WebCore/page/PluginHalterClient.h
index 7ea460a..f77091f 100644
--- a/WebCore/page/PluginHalterClient.h
+++ b/WebCore/page/PluginHalterClient.h
@@ -35,6 +35,7 @@ public:
     virtual ~PluginHalterClient() { }
 
     virtual bool shouldHaltPlugin(Node*) const = 0;
+    virtual bool enabled() const = 0;
 };
 
 } // namespace WebCore
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 672fcab..b8b9e8e 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -117,7 +117,6 @@ Settings::Settings(Page* page)
     , m_xssAuditorEnabled(false)
     , m_acceleratedCompositingEnabled(true)
     , m_experimentalNotificationsEnabled(false)
-    , m_pluginHalterEnabled(false)
     , m_webGLEnabled(false)
 #if ENABLE(WEB_SOCKETS)
     , m_experimentalWebSocketsEnabled(false)
@@ -515,16 +514,6 @@ void Settings::setExperimentalNotificationsEnabled(bool enabled)
     m_experimentalNotificationsEnabled = enabled;
 }
 
-void Settings::setPluginHalterEnabled(bool enabled)
-{
-    if (m_pluginHalterEnabled == enabled)
-        return;
-
-    m_pluginHalterEnabled = enabled;
-
-    m_page->pluginHalterEnabledStateChanged();
-}
-
 void Settings::setPluginAllowedRunTime(unsigned runTime)
 {
     m_pluginAllowedRunTime = runTime;
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index d1de963..c3c397e 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -264,9 +264,6 @@ namespace WebCore {
         static bool shouldUseHighResolutionTimers() { return gShouldUseHighResolutionTimers; }
 #endif
 
-        void setPluginHalterEnabled(bool);
-        bool pluginHalterEnabled() const { return m_pluginHalterEnabled; }
-
         void setPluginAllowedRunTime(unsigned);
         unsigned pluginAllowedRunTime() const { return m_pluginAllowedRunTime; }
 
@@ -345,7 +342,6 @@ namespace WebCore {
         bool m_xssAuditorEnabled : 1;
         bool m_acceleratedCompositingEnabled : 1;
         bool m_experimentalNotificationsEnabled : 1;
-        bool m_pluginHalterEnabled : 1;
         bool m_webGLEnabled : 1;
 
 #if ENABLE(WEB_SOCKETS)
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 5b4e6f8..300ff02 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,31 @@
+2009-10-08  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
+        for the existence of a PluginHalterDelegate.
+
+        Reviewed by Dan Bernstein.
+
+        * 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. 
+
 2009-10-08  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
index 48c655d..0bab4e3 100644
--- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
+++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
@@ -36,6 +36,7 @@ public:
     WebPluginHalterClient(WebView *);
     
     virtual bool shouldHaltPlugin(WebCore::Node*) const;
+    virtual bool enabled() const;
     
 private:
     WebView *m_webView;
diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
index 2384d0b..b83e4c8 100644
--- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
@@ -42,3 +42,8 @@ bool WebPluginHalterClient::shouldHaltPlugin(Node* pluginNode) const
     ASSERT_ARG(pluginNode, pluginNode);    
     return CallUIDelegateReturningBoolean(NO, m_webView, @selector(webView:shouldHaltPlugin:), kit(pluginNode));
 }
+
+bool WebPluginHalterClient::enabled() const
+{
+    return [[m_webView UIDelegate] respondsToSelector:@selector(webView:shouldHaltPlugin:)];
+}
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index d6c9d3c..1f4d72e 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -87,7 +87,6 @@
 #define WebKitXSSAuditorEnabledPreferenceKey @"WebKitXSSAuditorEnabled"
 #define WebKitAcceleratedCompositingEnabledPreferenceKey @"WebKitAcceleratedCompositingEnabled"
 #define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled"
-#define WebKitPluginHalterEnabledPreferenceKey @"WebKitPluginHalterEnabled"
 #define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
 
 // These are private both because callers should be using the cover methods and because the
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index 2910d27..8c19ae4 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -353,7 +353,6 @@ static WebCacheModel cacheModelForMainBundle(void)
         [NSNumber numberWithBool:YES],  WebKitXSSAuditorEnabledPreferenceKey,
         [NSNumber numberWithBool:YES],  WebKitAcceleratedCompositingEnabledPreferenceKey,
         [NSNumber numberWithBool:NO],   WebKitWebGLEnabledPreferenceKey,
-        [NSNumber numberWithBool:NO],   WebKitPluginHalterEnabledPreferenceKey,
         [NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
         nil];
 
@@ -1173,16 +1172,6 @@ static NSString *classIBCreatorID = nil;
     [self _setBoolValue:enabled forKey:WebKitWebGLEnabledPreferenceKey];
 }
 
-- (BOOL)pluginHalterEnabled
-{
-    return [self _boolValueForKey:WebKitPluginHalterEnabledPreferenceKey];
-}
-
-- (void)setPluginHalterEnabled:(BOOL)enabled
-{
-    [self _setBoolValue:enabled forKey:WebKitPluginHalterEnabledPreferenceKey];
-}
-
 - (unsigned)pluginAllowedRunTime
 {
     return [self _integerValueForKey:WebKitPluginAllowedRunTimePreferenceKey];
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 6a25921..b1850a2 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -113,9 +113,6 @@ extern NSString *WebPreferencesRemovedNotification;
 - (BOOL)experimentalWebSocketsEnabled;
 - (void)setExperimentalWebSocketsEnabled:(BOOL)websocketsEnabled;
 
-- (BOOL)pluginHalterEnabled;
-- (void)setPluginHalterEnabled:(BOOL)enabled;
-
 - (unsigned)pluginAllowedRunTime;
 - (void)setPluginAllowedRunTime:(unsigned)allowedRunTime;
 
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 36993ee..e2dff16 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -1317,7 +1317,6 @@ static bool fastDocumentTeardownEnabled()
     settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
     settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
     settings->setAcceleratedCompositingEnabled([preferences acceleratedCompositingEnabled]);
-    settings->setPluginHalterEnabled([preferences pluginHalterEnabled]);
     settings->setPluginAllowedRunTime([preferences pluginAllowedRunTime]);
     settings->setWebGLEnabled([preferences webGLEnabled]);
 }
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index ad0d523..667fe58 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,34 @@
+2009-10-08  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
+        for the existence of a PluginHalterDelegate.
+
+        Reviewed by Dan Bernstein.
+
+        * 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.
+
 2009-10-08  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
index d994211..99737a4 100644
--- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
+++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -92,9 +92,6 @@ interface IWebPreferencesPrivate : IUnknown
     // Used by DumpRenderTree.
     HRESULT setPreferenceForTest([in] BSTR key, [in] BSTR value);
 
-    HRESULT setPluginHalterEnabled([in] BOOL enabled);
-    HRESULT pluginHalterEnabled([out, retval] BOOL* enabled);
-
     HRESULT setPluginAllowedRunTime([in] UINT allowedRunTime);
     HRESULT pluginAllowedRunTime([out, retval] UINT* allowedRunTime);
 }
diff --git a/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp b/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp
index aef313b..78daf8d 100644
--- a/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp
@@ -56,3 +56,12 @@ bool WebPluginHalterClient::shouldHaltPlugin(WebCore::Node* n) const
 
     return shouldHalt;
 }
+
+bool WebPluginHalterClient::enabled() const
+{
+    IWebPluginHalterDelegate* d;
+    if (FAILED(m_webView->pluginHalterDelegate(&d)) || !d)
+        return false;
+
+    return true;
+}
diff --git a/WebKit/win/WebCoreSupport/WebPluginHalterClient.h b/WebKit/win/WebCoreSupport/WebPluginHalterClient.h
index 1752444..7d05fe9 100644
--- a/WebKit/win/WebCoreSupport/WebPluginHalterClient.h
+++ b/WebKit/win/WebCoreSupport/WebPluginHalterClient.h
@@ -39,6 +39,7 @@ public:
     WebPluginHalterClient(WebView* webView);
 
     virtual bool shouldHaltPlugin(WebCore::Node* n) const;
+    virtual bool enabled() const;
 
 private:
     WebView* m_webView;
diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h
index e0c2b6f..a23aa26 100644
--- a/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/WebKit/win/WebPreferenceKeysPrivate.h
@@ -129,6 +129,4 @@
 
 #define WebKitUseHighResolutionTimersPreferenceKey "WebKitUseHighResolutionTimers"
 
-#define WebKitPluginHalterEnabledPreferenceKey "WebKitPluginHalterEnabled"
-
 #define WebKitPluginAllowedRunTimePreferenceKey "WebKitPluginAllowedRunTime"
diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp
index e37177e..15d8efb 100644
--- a/WebKit/win/WebPreferences.cpp
+++ b/WebKit/win/WebPreferences.cpp
@@ -253,8 +253,6 @@ void WebPreferences::initializeDefaultSettings()
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitUseHighResolutionTimersPreferenceKey), kCFBooleanTrue);
 
-    CFDictionaryAddValue(defaults, CFSTR(WebKitPluginHalterEnabledPreferenceKey), kCFBooleanFalse);
-
     RetainPtr<CFStringRef> pluginAllowedRunTime(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%u"), numeric_limits<unsigned>::max()));
     CFDictionaryAddValue(defaults, CFSTR(WebKitPluginAllowedRunTimePreferenceKey), pluginAllowedRunTime.get());
 
@@ -1348,19 +1346,6 @@ HRESULT STDMETHODCALLTYPE WebPreferences::shouldUseHighResolutionTimers(BOOL* us
     return S_OK;
 }
 
-
-HRESULT STDMETHODCALLTYPE WebPreferences::setPluginHalterEnabled(BOOL enabled)
-{
-    setBoolValue(CFSTR(WebKitPluginHalterEnabledPreferenceKey), enabled);
-    return S_OK;
-}
-
-HRESULT STDMETHODCALLTYPE WebPreferences::pluginHalterEnabled(BOOL* enabled)
-{
-    *enabled = boolValueForKey(CFSTR(WebKitPluginHalterEnabledPreferenceKey));
-    return S_OK;
-}
-
 HRESULT WebPreferences::setPluginAllowedRunTime(UINT allowedRunTime)
 {
     setIntegerValue(CFSTR(WebKitPluginAllowedRunTimePreferenceKey), allowedRunTime);
diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h
index 14035d0..b3b3ba9 100644
--- a/WebKit/win/WebPreferences.h
+++ b/WebKit/win/WebPreferences.h
@@ -380,12 +380,6 @@ public:
     virtual HRESULT STDMETHODCALLTYPE shouldUseHighResolutionTimers(
     /* [retval][out] */ BOOL* useHighResolutionTimers);
 
-    virtual HRESULT STDMETHODCALLTYPE setPluginHalterEnabled(
-    /* [in] */ BOOL enabled);
-
-    virtual HRESULT STDMETHODCALLTYPE pluginHalterEnabled(
-    /* [retval][out] */ BOOL* enabled);
-
     virtual HRESULT STDMETHODCALLTYPE setPluginAllowedRunTime(
     /* [in] */ UINT allowedRunTime);
 
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 3e13d0a..64d0aa9 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -4441,11 +4441,6 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
         return hr;
     settings->setShouldUseHighResolutionTimers(enabled);
 
-    hr = prefsPrivate->pluginHalterEnabled(&enabled);
-    if (FAILED(hr))
-        return hr;
-    settings->setPluginHalterEnabled(enabled);
-
     UINT runTime;
     hr = prefsPrivate->pluginAllowedRunTime(&runTime);
     if (FAILED(hr))

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list