Diff
Modified: trunk/Source/WebCore/ChangeLog (164912 => 164913)
--- trunk/Source/WebCore/ChangeLog 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebCore/ChangeLog 2014-03-01 08:49:34 UTC (rev 164913)
@@ -1,3 +1,48 @@
+2014-03-01 Gavin Barraclough <barraclo...@apple.com>
+
+ Split UserActivity/CountedUserActivity
+ https://bugs.webkit.org/show_bug.cgi?id=129520
+
+ Reviewed by Sam Weinig.
+
+ UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
+ In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
+
+ * WebCore.exp.in:
+ - beginActivity->start, endActivity->stop.
+ * WebCore.xcodeproj/project.pbxproj:
+ * page/PageThrottler.cpp:
+ (WebCore::PageThrottler::PageThrottler):
+ (WebCore::PageThrottler::~PageThrottler):
+ (WebCore::PageThrottler::throttlePage):
+ (WebCore::PageThrottler::unthrottlePage):
+ (WebCore::PageThrottler::setIsVisuallyIdle):
+ - beginActivity->increment, endActivity->decrement.
+ * page/PageThrottler.h:
+ - UserActivity->CountedUserActivity for m_pageActivity
+ * platform/CountedUserActivity.h: Copied from Source/WebCore/platform/UserActivity.h.
+ (WebCore::CountedUserActivity::CountedUserActivity):
+ (WebCore::CountedUserActivity::increment):
+ (WebCore::CountedUserActivity::decrement):
+ - Added, provides counted interface to UserActivity.
+ * platform/UserActivity.cpp:
+ (WebCore::UserActivity::UserActivity):
+ - m_count removed
+ (WebCore::UserActivity::start):
+ (WebCore::UserActivity::stop):
+ - beginActivity->start, endActivity->stop, implentation now empty.
+ * platform/UserActivity.h:
+ - beginActivity->start, endActivity->stop, m_count moved to HAVE(NS_ACTIVITY)
+ * platform/mac/UserActivityMac.mm:
+ (WebCore::UserActivity::UserActivity):
+ - m_count->m_started
+ (WebCore::UserActivity::isValid):
+ - m_count->m_started
+ (WebCore::UserActivity::start):
+ (WebCore::UserActivity::stop):
+ - beginActivity->start, endActivity->stop, no longer nest
+
+
2014-02-28 Benjamin Poulain <benja...@webkit.org>
Caller saved registers can be accidentally discarded when clearing the local stack
Modified: trunk/Source/WebCore/WebCore.exp.in (164912 => 164913)
--- trunk/Source/WebCore/WebCore.exp.in 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebCore/WebCore.exp.in 2014-03-01 08:49:34 UTC (rev 164913)
@@ -240,8 +240,8 @@
__ZN7WebCore12TextIterator8subrangeEPNS_5RangeEii
__ZN7WebCore12TextIteratorC1EPKNS_5RangeENS_20TextIteratorBehaviorE
__ZN7WebCore12TextIteratorD1Ev
-__ZN7WebCore12UserActivity11endActivityEv
-__ZN7WebCore12UserActivity13beginActivityEv
+__ZN7WebCore12UserActivity4stopEv
+__ZN7WebCore12UserActivity5startEv
__ZN7WebCore12UserActivityC1EPKc
__ZN7WebCore12UTF8EncodingEv
__ZN7WebCore12WorkerThread17workerThreadCountEv
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (164912 => 164913)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-03-01 08:49:34 UTC (rev 164913)
@@ -2936,6 +2936,7 @@
85FF315B0AAFBFCB00374F38 /* DOMKeyboardEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */; };
861C2EA413FB4FDD00062ABB /* DocumentLoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA313FB4FDD00062ABB /* DocumentLoadTiming.cpp */; };
861C2EA613FB4FFF00062ABB /* ResourceLoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */; };
+ 862F129E18C1576F005C54AF /* CountedUserActivity.h in Headers */ = {isa = PBXBuildFile; fileRef = 862F129D18C1572C005C54AF /* CountedUserActivity.h */; settings = {ATTRIBUTES = (Private, ); }; };
86512EDE154A2AEF00A90426 /* PerformanceResourceTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */; };
86512EDF154A2AEF00A90426 /* PerformanceResourceTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 86512EDC154A2AEF00A90426 /* PerformanceResourceTiming.h */; };
8678D0BB1878E891003ABDE6 /* ViewState.h in Headers */ = {isa = PBXBuildFile; fileRef = 8678D0BA1878E810003ABDE6 /* ViewState.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -9838,6 +9839,7 @@
85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMKeyboardEvent.mm; sourceTree = "<group>"; };
861C2EA313FB4FDD00062ABB /* DocumentLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoadTiming.cpp; sourceTree = "<group>"; };
861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadTiming.cpp; sourceTree = "<group>"; };
+ 862F129D18C1572C005C54AF /* CountedUserActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountedUserActivity.h; sourceTree = "<group>"; };
86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceResourceTiming.cpp; sourceTree = "<group>"; };
86512EDC154A2AEF00A90426 /* PerformanceResourceTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceResourceTiming.h; sourceTree = "<group>"; };
86512EDD154A2AEF00A90426 /* PerformanceResourceTiming.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceResourceTiming.idl; sourceTree = "<group>"; };
@@ -20700,6 +20702,7 @@
06027CAC0B1CBFC000884B2D /* ContextMenuItem.h */,
D8B6152E1032495100C8554A /* Cookie.h */,
339B5B62131DAA3200F48D02 /* CookiesStrategy.h */,
+ 862F129D18C1572C005C54AF /* CountedUserActivity.h */,
2E4346560F546A9900B0F1BA /* CrossThreadCopier.cpp */,
2E4346570F546A9900B0F1BA /* CrossThreadCopier.h */,
E11AF15011B9A1A300805103 /* Cursor.cpp */,
@@ -25386,6 +25389,7 @@
088A0E07126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h in Headers */,
088A0E08126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h in Headers */,
08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */,
+ 862F129E18C1576F005C54AF /* CountedUserActivity.h in Headers */,
08525E631278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h in Headers */,
084DB59B128008CC002A6D64 /* SVGAnimatedString.h in Headers */,
08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */,
Modified: trunk/Source/WebCore/page/PageThrottler.cpp (164912 => 164913)
--- trunk/Source/WebCore/page/PageThrottler.cpp 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebCore/page/PageThrottler.cpp 2014-03-01 08:49:34 UTC (rev 164913)
@@ -45,7 +45,7 @@
, m_visuallyNonIdle("Page is not visually idle.")
, m_pageActivity("Page is active.")
{
- m_pageActivity.beginActivity();
+ m_pageActivity.increment();
setIsVisuallyIdle(viewState & ViewState::IsVisuallyIdle);
}
@@ -58,7 +58,7 @@
(*it)->invalidate();
if (m_throttleState != PageThrottledState)
- m_pageActivity.endActivity();
+ m_pageActivity.decrement();
}
void PageThrottler::hiddenPageDOMTimerThrottlingStateChanged()
@@ -80,7 +80,7 @@
{
m_throttleState = PageThrottledState;
- m_pageActivity.endActivity();
+ m_pageActivity.decrement();
m_page.setTimerThrottlingEnabled(true);
}
@@ -94,7 +94,7 @@
return;
if (oldState == PageThrottledState)
- m_pageActivity.beginActivity();
+ m_pageActivity.increment();
m_page.setTimerThrottlingEnabled(false);
}
@@ -123,13 +123,11 @@
if (isVisuallyIdle) {
m_throttleState = PageWaitingToThrottleState;
startThrottleHysteresisTimer();
- if (m_visuallyNonIdle.isActive())
- m_visuallyNonIdle.endActivity();
+ m_visuallyNonIdle.stop();
} else {
unthrottlePage();
stopThrottleHysteresisTimer();
- if (!m_visuallyNonIdle.isActive())
- m_visuallyNonIdle.beginActivity();
+ m_visuallyNonIdle.start();
}
}
Modified: trunk/Source/WebCore/page/PageThrottler.h (164912 => 164913)
--- trunk/Source/WebCore/page/PageThrottler.h 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebCore/page/PageThrottler.h 2014-03-01 08:49:34 UTC (rev 164913)
@@ -28,7 +28,7 @@
#include "Timer.h"
-#include "UserActivity.h"
+#include "CountedUserActivity.h"
#include "ViewState.h"
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
@@ -82,7 +82,7 @@
Timer<PageThrottler> m_throttleHysteresisTimer;
HashSet<PageActivityAssertionToken*> m_activityTokens;
UserActivity m_visuallyNonIdle;
- UserActivity m_pageActivity;
+ CountedUserActivity m_pageActivity;
};
}
Copied: trunk/Source/WebCore/platform/CountedUserActivity.h (from rev 164891, trunk/Source/WebCore/platform/UserActivity.h) (0 => 164913)
--- trunk/Source/WebCore/platform/CountedUserActivity.h (rev 0)
+++ trunk/Source/WebCore/platform/CountedUserActivity.h 2014-03-01 08:49:34 UTC (rev 164913)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CountedUserActivity_h
+#define CountedUserActivity_h
+
+#include <WebCore/UserActivity.h>
+
+namespace WebCore {
+
+class CountedUserActivity {
+public:
+ CountedUserActivity(const char* description)
+ : m_activity(description)
+ , m_count(0)
+ {
+ }
+
+ void increment()
+ {
+ if (!m_count++)
+ m_activity.start();
+ }
+
+ void decrement()
+ {
+ if (!--m_count)
+ m_activity.stop();
+ }
+
+private:
+ UserActivity m_activity;
+ size_t m_count;
+};
+
+} // namespace WebCore
+
+using WebCore::CountedUserActivity;
+
+#endif // CountedUserActivity_h
Modified: trunk/Source/WebCore/platform/UserActivity.cpp (164912 => 164913)
--- trunk/Source/WebCore/platform/UserActivity.cpp 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebCore/platform/UserActivity.cpp 2014-03-01 08:49:34 UTC (rev 164913)
@@ -31,19 +31,15 @@
#if !HAVE(NS_ACTIVITY)
UserActivity::UserActivity(const char*)
- : m_count(0)
{
}
-void UserActivity::beginActivity()
+void UserActivity::start()
{
- ++m_count;
}
-void UserActivity::endActivity()
+void UserActivity::stop()
{
- ASSERT(m_count);
- --m_count;
}
#endif
Modified: trunk/Source/WebCore/platform/UserActivity.h (164912 => 164913)
--- trunk/Source/WebCore/platform/UserActivity.h 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebCore/platform/UserActivity.h 2014-03-01 08:49:34 UTC (rev 164913)
@@ -41,18 +41,15 @@
public:
UserActivity(const char* description);
- void beginActivity();
- void endActivity();
+ void start();
+ void stop();
- bool isActive() const { return m_count; }
-
private:
- size_t m_count;
-
#if HAVE(NS_ACTIVITY)
void hysteresisTimerFired();
bool isValid();
+ bool m_active;
RetainPtr<NSString> m_description;
RunLoop::Timer<UserActivity> m_timer;
RetainPtr<id> m_activity;
Modified: trunk/Source/WebCore/platform/mac/UserActivityMac.mm (164912 => 164913)
--- trunk/Source/WebCore/platform/mac/UserActivityMac.mm 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebCore/platform/mac/UserActivityMac.mm 2014-03-01 08:49:34 UTC (rev 164913)
@@ -33,7 +33,7 @@
static const double kHysteresisSeconds = 5.0;
UserActivity::UserActivity(const char* description)
- : m_count(0)
+ : m_active(false)
, m_description([NSString stringWithUTF8String:description])
, m_timer(RunLoop::main(), this, &UserActivity::hysteresisTimerFired)
{
@@ -46,14 +46,17 @@
// Else if count is zero then:
// (a) if we're holding an activity there should be an active timer to clear this,
// (b) if we're not holding an activity there should be no active timer.
- return m_count ? m_activity && !m_timer.isActive() : !!m_activity == m_timer.isActive();
+ return m_active ? m_activity && !m_timer.isActive() : !!m_activity == m_timer.isActive();
}
-void UserActivity::beginActivity()
+void UserActivity::start()
{
ASSERT(isValid());
- ++m_count;
+ if (m_active)
+ return;
+ m_active = true;
+
if (m_timer.isActive())
m_timer.stop();
if (!m_activity) {
@@ -64,14 +67,16 @@
ASSERT(isValid());
}
-void UserActivity::endActivity()
+void UserActivity::stop()
{
- ASSERT(m_count);
ASSERT(isValid());
- if (!--m_count)
- m_timer.startOneShot(kHysteresisSeconds);
+ if (!m_active)
+ return;
+ m_active = false;
+ m_timer.startOneShot(kHysteresisSeconds);
+
ASSERT(isValid());
}
Modified: trunk/Source/WebKit2/ChangeLog (164912 => 164913)
--- trunk/Source/WebKit2/ChangeLog 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebKit2/ChangeLog 2014-03-01 08:49:34 UTC (rev 164913)
@@ -1,3 +1,34 @@
+2014-03-01 Gavin Barraclough <barraclo...@apple.com>
+
+ Split UserActivity/CountedUserActivity
+ https://bugs.webkit.org/show_bug.cgi?id=129520
+
+ Reviewed by Sam Weinig.
+
+ UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
+ In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
+
+ * PluginProcess/PluginProcess.h:
+ (WebKit::PluginProcess::connectionActivity):
+ - UserActivity->CountedUserActivity
+ * PluginProcess/mac/PluginProcessMac.mm:
+ (WebKit::PluginProcess::platformInitializeProcess):
+ - beginActivity->start
+ * Shared/ActivityAssertion.cpp:
+ (WebKit::ActivityAssertion::ActivityAssertion):
+ (WebKit::ActivityAssertion::~ActivityAssertion):
+ - beginActivity->increment, endActivity->decrement.
+ * Shared/ActivityAssertion.h:
+ - UserActivity->CountedUserActivity
+ * Shared/ChildProcess.cpp:
+ (WebKit::ChildProcess::setProcessSuppressionEnabled):
+ - beginActivity->start, endActivity->stop.
+ * Shared/ChildProcess.h:
+ - removed processSuppressionEnabled()
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+ - beginActivity->start, endActivity->stop.
+
2014-03-01 Csaba Osztrogonác <o...@webkit.org>
Unreviewed trivial Linux buildfix after r164905.
Modified: trunk/Source/WebKit2/PluginProcess/PluginProcess.h (164912 => 164913)
--- trunk/Source/WebKit2/PluginProcess/PluginProcess.h 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebKit2/PluginProcess/PluginProcess.h 2014-03-01 08:49:34 UTC (rev 164913)
@@ -29,6 +29,7 @@
#if ENABLE(NETSCAPE_PLUGIN_API)
#include "ChildProcess.h"
+#include <WebCore/CountedUserActivity.h>
#include <wtf/Forward.h>
#include <wtf/NeverDestroyed.h>
#include <wtf/text/WTFString.h>
@@ -63,7 +64,7 @@
bool openFile(const String& urlString);
#endif
- UserActivity& connectionActivity() { return m_connectionActivity; }
+ CountedUserActivity& connectionActivity() { return m_connectionActivity; }
private:
PluginProcess();
@@ -119,7 +120,7 @@
#endif
static void lowMemoryHandler(bool critical);
- UserActivity m_connectionActivity;
+ CountedUserActivity m_connectionActivity;
};
} // namespace WebKit
Modified: trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm (164912 => 164913)
--- trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm 2014-03-01 08:49:34 UTC (rev 164913)
@@ -438,7 +438,7 @@
// FIXME: Workaround for Java not liking its plugin process to be supressed - <rdar://problem/14267843>
if (m_pluginBundleIdentifier == "com.oracle.java.JavaAppletPlugin")
- (new UserActivity("com.oracle.java.JavaAppletPlugin"))->beginActivity();
+ (new UserActivity("com.oracle.java.JavaAppletPlugin"))->start();
}
void PluginProcess::initializeProcessName(const ChildProcessInitializationParameters& parameters)
Modified: trunk/Source/WebKit2/Shared/ActivityAssertion.cpp (164912 => 164913)
--- trunk/Source/WebKit2/Shared/ActivityAssertion.cpp 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebKit2/Shared/ActivityAssertion.cpp 2014-03-01 08:49:34 UTC (rev 164913)
@@ -28,15 +28,15 @@
namespace WebKit {
-ActivityAssertion::ActivityAssertion(UserActivity& activity)
+ActivityAssertion::ActivityAssertion(CountedUserActivity& activity)
: m_activity(activity)
{
- m_activity.beginActivity();
+ m_activity.increment();
}
ActivityAssertion::~ActivityAssertion()
{
- m_activity.endActivity();
+ m_activity.decrement();
}
}
Modified: trunk/Source/WebKit2/Shared/ActivityAssertion.h (164912 => 164913)
--- trunk/Source/WebKit2/Shared/ActivityAssertion.h 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebKit2/Shared/ActivityAssertion.h 2014-03-01 08:49:34 UTC (rev 164913)
@@ -26,7 +26,7 @@
#ifndef ActivityAssertion_h
#define ActivityAssertion_h
-#include <WebCore/UserActivity.h>
+#include <WebCore/CountedUserActivity.h>
#include <wtf/Noncopyable.h>
namespace WebKit {
@@ -34,11 +34,11 @@
class ActivityAssertion {
WTF_MAKE_NONCOPYABLE(ActivityAssertion);
public:
- explicit ActivityAssertion(UserActivity&);
+ explicit ActivityAssertion(CountedUserActivity&);
~ActivityAssertion();
private:
- UserActivity& m_activity;
+ CountedUserActivity& m_activity;
};
}
Modified: trunk/Source/WebKit2/Shared/ChildProcess.cpp (164912 => 164913)
--- trunk/Source/WebKit2/Shared/ChildProcess.cpp 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebKit2/Shared/ChildProcess.cpp 2014-03-01 08:49:34 UTC (rev 164913)
@@ -75,13 +75,10 @@
void ChildProcess::setProcessSuppressionEnabled(bool enabled)
{
- if (processSuppressionEnabled() == enabled)
- return;
-
if (enabled)
- m_processSuppressionDisabled.endActivity();
+ m_processSuppressionDisabled.stop();
else
- m_processSuppressionDisabled.beginActivity();
+ m_processSuppressionDisabled.start();
}
void ChildProcess::initializeProcess(const ChildProcessInitializationParameters&)
Modified: trunk/Source/WebKit2/Shared/ChildProcess.h (164912 => 164913)
--- trunk/Source/WebKit2/Shared/ChildProcess.h 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebKit2/Shared/ChildProcess.h 2014-03-01 08:49:34 UTC (rev 164913)
@@ -63,7 +63,6 @@
void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID);
void setProcessSuppressionEnabled(bool);
- bool processSuppressionEnabled() const { return !m_processSuppressionDisabled.isActive(); }
#if PLATFORM(COCOA)
void setApplicationIsDaemon();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (164912 => 164913)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-03-01 08:35:23 UTC (rev 164912)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-03-01 08:49:34 UTC (rev 164913)
@@ -2623,13 +2623,10 @@
settings.setLayoutInterval(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::duration<double>(store.getDoubleValueForKey(WebPreferencesKey::layoutIntervalKey()))));
settings.setMaxParseDuration(store.getDoubleValueForKey(WebPreferencesKey::maxParseDurationKey()));
- if (store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey())) {
- if (m_processSuppressionDisabledByWebPreference.isActive())
- m_processSuppressionDisabledByWebPreference.endActivity();
- } else {
- if (!m_processSuppressionDisabledByWebPreference.isActive())
- m_processSuppressionDisabledByWebPreference.beginActivity();
- }
+ if (store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey()))
+ m_processSuppressionDisabledByWebPreference.stop();
+ else
+ m_processSuppressionDisabledByWebPreference.start();
platformPreferencesDidChange(store);