Diff
Modified: trunk/Source/WTF/ChangeLog (197359 => 197360)
--- trunk/Source/WTF/ChangeLog 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WTF/ChangeLog 2016-02-29 18:55:21 UTC (rev 197360)
@@ -1,3 +1,18 @@
+2016-02-29 Gavin Barraclough <[email protected]>
+
+ RefCounter<T>::Event -> RefCounterEvent
+ https://bugs.webkit.org/show_bug.cgi?id=154767
+
+ Reviewed by Darin Adler.
+
+ RefCounter<T>::Event is kinda verbose to use, and there is no need for this
+ to be specific to a particular typeof RefCounter. Move the enum class up to
+ the top level & rename to RefCounterEvent.
+
+ * wtf/RefCounter.h:
+ (WTF::RefCounter<T>::Count::ref):
+ (WTF::RefCounter<T>::Count::deref):
+
2016-02-26 Oliver Hunt <[email protected]>
Remove the on demand executable allocator
Modified: trunk/Source/WTF/wtf/RefCounter.h (197359 => 197360)
--- trunk/Source/WTF/wtf/RefCounter.h 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WTF/wtf/RefCounter.h 2016-02-29 18:55:21 UTC (rev 197360)
@@ -32,6 +32,8 @@
namespace WTF {
+enum class RefCounterEvent { Decrement, Increment };
+
template<typename T>
class RefCounter {
WTF_MAKE_NONCOPYABLE(RefCounter);
@@ -57,8 +59,7 @@
public:
using Token = RefPtr<Count>;
- enum class Event { Decrement, Increment };
- using ValueChangeFunction = std::function<void (Event)>;
+ using ValueChangeFunction = std::function<void (RefCounterEvent)>;
RefCounter(ValueChangeFunction = nullptr);
~RefCounter();
@@ -83,7 +84,7 @@
{
++m_value;
if (m_refCounter && m_refCounter->m_valueDidChange)
- m_refCounter->m_valueDidChange(Event::Increment);
+ m_refCounter->m_valueDidChange(RefCounterEvent::Increment);
}
template<typename T>
@@ -93,7 +94,7 @@
--m_value;
if (m_refCounter && m_refCounter->m_valueDidChange)
- m_refCounter->m_valueDidChange(Event::Decrement);
+ m_refCounter->m_valueDidChange(RefCounterEvent::Decrement);
// The Count object is kept alive so long as either the RefCounter that created it remains
// allocated, or so long as its reference count is non-zero.
@@ -126,5 +127,6 @@
} // namespace WTF
using WTF::RefCounter;
+using WTF::RefCounterEvent;
#endif // RefCounter_h
Modified: trunk/Source/WebCore/ChangeLog (197359 => 197360)
--- trunk/Source/WebCore/ChangeLog 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebCore/ChangeLog 2016-02-29 18:55:21 UTC (rev 197360)
@@ -1,3 +1,24 @@
+2016-02-29 Gavin Barraclough <[email protected]>
+
+ RefCounter<T>::Event -> RefCounterEvent
+ https://bugs.webkit.org/show_bug.cgi?id=154767
+
+ Reviewed by Darin Adler.
+
+ RefCounter<T>::Event is kinda verbose to use, and there is no need for this
+ to be specific to a particular typeof RefCounter. Move the enum class up to
+ the top level & rename to RefCounterEvent.
+
+ * page/PageThrottler.cpp:
+ (WebCore::PageThrottler::PageThrottler):
+ (WebCore::m_audiblePluginHysteresis):
+ (WebCore::m_mediaActivityCounter):
+ (WebCore::m_pageLoadActivityCounter):
+ * platform/VNodeTracker.cpp:
+ (WebCore::VNodeTracker::singleton):
+ (WebCore::VNodeTracker::VNodeTracker):
+ (WebCore::m_lastWarningTime):
+
2016-02-29 Chris Dumez <[email protected]>
Use HTML parsing rules for textarea.maxLength
Modified: trunk/Source/WebCore/page/PageThrottler.cpp (197359 => 197360)
--- trunk/Source/WebCore/page/PageThrottler.cpp 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebCore/page/PageThrottler.cpp 2016-02-29 18:55:21 UTC (rev 197360)
@@ -34,8 +34,8 @@
: m_page(page)
, m_userInputHysteresis([this](HysteresisState state) { setActivityFlag(PageActivityState::UserInputActivity, state == HysteresisState::Started); })
, m_audiblePluginHysteresis([this](HysteresisState state) { setActivityFlag(PageActivityState::AudiblePlugin, state == HysteresisState::Started); })
- , m_mediaActivityCounter([this](PageActivityCounter::Event) { setActivityFlag(PageActivityState::MediaActivity, m_mediaActivityCounter.value()); })
- , m_pageLoadActivityCounter([this](PageActivityCounter::Event) { setActivityFlag(PageActivityState::PageLoadActivity, m_pageLoadActivityCounter.value()); })
+ , m_mediaActivityCounter([this](RefCounterEvent) { setActivityFlag(PageActivityState::MediaActivity, m_mediaActivityCounter.value()); })
+ , m_pageLoadActivityCounter([this](RefCounterEvent) { setActivityFlag(PageActivityState::PageLoadActivity, m_pageLoadActivityCounter.value()); })
{
}
Modified: trunk/Source/WebCore/platform/VNodeTracker.cpp (197359 => 197360)
--- trunk/Source/WebCore/platform/VNodeTracker.cpp 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebCore/platform/VNodeTracker.cpp 2016-02-29 18:55:21 UTC (rev 197360)
@@ -39,7 +39,7 @@
}
VNodeTracker::VNodeTracker()
- : m_vnodeCounter([this](VNodeCounter::Event event) { if (event == VNodeCounter::Event::Increment) checkPressureState(); })
+ : m_vnodeCounter([this](RefCounterEvent event) { if (event == RefCounterEvent::Increment) checkPressureState(); })
, m_pressureWarningTimer(*this, &VNodeTracker::pressureWarningTimerFired)
, m_lastWarningTime(std::chrono::steady_clock::now())
{
Modified: trunk/Source/WebKit2/ChangeLog (197359 => 197360)
--- trunk/Source/WebKit2/ChangeLog 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebKit2/ChangeLog 2016-02-29 18:55:21 UTC (rev 197360)
@@ -1,3 +1,34 @@
+2016-02-29 Gavin Barraclough <[email protected]>
+
+ RefCounter<T>::Event -> RefCounterEvent
+ https://bugs.webkit.org/show_bug.cgi?id=154767
+
+ Reviewed by Darin Adler.
+
+ RefCounter<T>::Event is kinda verbose to use, and there is no need for this
+ to be specific to a particular typeof RefCounter. Move the enum class up to
+ the top level & rename to RefCounterEvent.
+
+ Also remove UserObservablePageToken - this is vestigial & not really offering
+ anything over just using UserObservablePageCounter::Token directly.
+
+ * UIProcess/Plugins/PluginProcessManager.cpp:
+ (WebKit::PluginProcessManager::PluginProcessManager):
+ * UIProcess/Plugins/PluginProcessManager.h:
+ * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
+ (WebKit::PluginProcessManager::updateProcessSuppressionDisabled):
+ * UIProcess/ProcessThrottler.cpp:
+ (WebKit::ProcessThrottler::ProcessThrottler):
+ (WebKit::m_backgroundCounter):
+ (WebKit::m_suspendMessageCount):
+ * UIProcess/ProcessThrottler.h:
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::WebProcessPool):
+ (WebKit::m_processSuppressionDisabledForPageCounter):
+ (WebKit::m_hiddenPageThrottlingAutoIncreasesCounter):
+ * UIProcess/WebProcessPool.h:
+
2016-02-29 Konstantin Tokarev <[email protected]>
Fixed compilation with !ENABLE(DATABASE_PROCESS).
Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp (197359 => 197360)
--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp 2016-02-29 18:55:21 UTC (rev 197360)
@@ -43,7 +43,7 @@
PluginProcessManager::PluginProcessManager()
#if PLATFORM(COCOA)
- : m_processSuppressionDisabledForPageCounter([this](ProcessSuppressionDisabledCounter::Event event) { updateProcessSuppressionDisabled(event); })
+ : m_processSuppressionDisabledForPageCounter([this](RefCounterEvent event) { updateProcessSuppressionDisabled(event); })
#endif
{
}
Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h (197359 => 197360)
--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h 2016-02-29 18:55:21 UTC (rev 197360)
@@ -68,7 +68,7 @@
#if PLATFORM(COCOA)
inline ProcessSuppressionDisabledToken processSuppressionDisabledToken();
inline bool processSuppressionDisabled() const;
- void updateProcessSuppressionDisabled(ProcessSuppressionDisabledCounter::Event);
+ void updateProcessSuppressionDisabled(RefCounterEvent);
#endif
private:
Modified: trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessManagerMac.mm (197359 => 197360)
--- trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessManagerMac.mm 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessManagerMac.mm 2016-02-29 18:55:21 UTC (rev 197360)
@@ -32,15 +32,15 @@
namespace WebKit {
-void PluginProcessManager::updateProcessSuppressionDisabled(ProcessSuppressionDisabledCounter::Event event)
+void PluginProcessManager::updateProcessSuppressionDisabled(RefCounterEvent event)
{
size_t disableCount = m_processSuppressionDisabledForPageCounter.value();
// We only care about zero/non-zero edge changes; ignore cases where the count was previously non-zero, and still is.
- if (disableCount >= 2 || (disableCount == 1 && event == ProcessSuppressionDisabledCounter::Event::Decrement))
+ if (disableCount >= 2 || (disableCount == 1 && event == RefCounterEvent::Decrement))
return;
- ASSERT((event == ProcessSuppressionDisabledCounter::Event::Increment && disableCount == 1)
- || (event == ProcessSuppressionDisabledCounter::Event::Decrement && !disableCount));
+ ASSERT((event == RefCounterEvent::Increment && disableCount == 1)
+ || (event == RefCounterEvent::Decrement && !disableCount));
bool enabled = !disableCount;
for (auto& pluginProcess : m_pluginProcesses)
Modified: trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp (197359 => 197360)
--- trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp 2016-02-29 18:55:21 UTC (rev 197360)
@@ -35,8 +35,8 @@
ProcessThrottler::ProcessThrottler(ProcessThrottlerClient& process)
: m_process(process)
, m_suspendTimer(RunLoop::main(), this, &ProcessThrottler::suspendTimerFired)
- , m_foregroundCounter([this](ForegroundActivityCounter::Event) { updateAssertion(); })
- , m_backgroundCounter([this](BackgroundActivityCounter::Event) { updateAssertion(); })
+ , m_foregroundCounter([this](RefCounterEvent) { updateAssertion(); })
+ , m_backgroundCounter([this](RefCounterEvent) { updateAssertion(); })
, m_suspendMessageCount(0)
{
}
Modified: trunk/Source/WebKit2/UIProcess/ProcessThrottler.h (197359 => 197360)
--- trunk/Source/WebKit2/UIProcess/ProcessThrottler.h 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebKit2/UIProcess/ProcessThrottler.h 2016-02-29 18:55:21 UTC (rev 197360)
@@ -36,7 +36,6 @@
enum UserObservablePageCounterType { };
typedef RefCounter<UserObservablePageCounterType> UserObservablePageCounter;
-typedef UserObservablePageCounter::Token UserObservablePageToken;
enum ProcessSuppressionDisabledCounterType { };
typedef RefCounter<ProcessSuppressionDisabledCounterType> ProcessSuppressionDisabledCounter;
typedef ProcessSuppressionDisabledCounter::Token ProcessSuppressionDisabledToken;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (197359 => 197360)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-02-29 18:55:21 UTC (rev 197360)
@@ -1764,7 +1764,7 @@
std::unique_ptr<RemoteLayerTreeScrollingPerformanceData> m_scrollingPerformanceData;
bool m_scrollPerformanceDataCollectionEnabled;
#endif
- UserObservablePageToken m_pageIsUserObservableCount;
+ UserObservablePageCounter::Token m_pageIsUserObservableCount;
ProcessSuppressionDisabledToken m_preventProcessSuppressionCount;
HiddenPageThrottlingAutoIncreasesCounter::Token m_hiddenPageDOMTimerThrottlingAutoIncreasesCount;
Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (197359 => 197360)
--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp 2016-02-29 18:55:21 UTC (rev 197360)
@@ -158,9 +158,9 @@
, m_canHandleHTTPSServerTrustEvaluation(true)
, m_didNetworkProcessCrash(false)
, m_memoryCacheDisabled(false)
- , m_userObservablePageCounter([this](UserObservablePageCounter::Event) { updateProcessSuppressionState(); })
- , m_processSuppressionDisabledForPageCounter([this](ProcessSuppressionDisabledCounter::Event) { updateProcessSuppressionState(); })
- , m_hiddenPageThrottlingAutoIncreasesCounter([this](HiddenPageThrottlingAutoIncreasesCounter::Event) { updateHiddenPageThrottlingAutoIncreaseLimit(); })
+ , m_userObservablePageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
+ , m_processSuppressionDisabledForPageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
+ , m_hiddenPageThrottlingAutoIncreasesCounter([this](RefCounterEvent) { updateHiddenPageThrottlingAutoIncreaseLimit(); })
{
for (auto& scheme : m_configuration->alwaysRevalidatedURLSchemes())
m_schemesToRegisterAsAlwaysRevalidated.add(scheme);
Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (197359 => 197360)
--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h 2016-02-29 18:55:21 UTC (rev 197360)
@@ -339,7 +339,7 @@
void setMemoryCacheDisabled(bool);
void setFontWhitelist(API::Array*);
- UserObservablePageToken userObservablePageCount()
+ UserObservablePageCounter::Token userObservablePageCount()
{
return m_userObservablePageCounter.count();
}
Modified: trunk/Tools/ChangeLog (197359 => 197360)
--- trunk/Tools/ChangeLog 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Tools/ChangeLog 2016-02-29 18:55:21 UTC (rev 197360)
@@ -1,3 +1,17 @@
+2016-02-29 Gavin Barraclough <[email protected]>
+
+ RefCounter<T>::Event -> RefCounterEvent
+ https://bugs.webkit.org/show_bug.cgi?id=154767
+
+ Reviewed by Darin Adler.
+
+ RefCounter<T>::Event is kinda verbose to use, and there is no need for this
+ to be specific to a particular typeof RefCounter. Move the enum class up to
+ the top level & rename to RefCounterEvent.
+
+ * TestWebKitAPI/Tests/WTF/RefCounter.cpp:
+ (TestWebKitAPI::TEST):
+
2016-02-29 Csaba Osztrogonác <[email protected]>
Remove more LLVM related cruft
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp (197359 => 197360)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp 2016-02-29 18:51:28 UTC (rev 197359)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp 2016-02-29 18:55:21 UTC (rev 197360)
@@ -80,11 +80,11 @@
{
// Testing (1a) - Construction with a callback.
TestCounter* counterPtr = nullptr;
- TestCounter counter([&](TestCounter::Event event) {
+ TestCounter counter([&](RefCounterEvent event) {
// Check that the callback is called at the expected times, and the correct number of times.
- if (TestCounter::Event::Increment == event)
+ if (RefCounterEvent::Increment == event)
EXPECT_EQ(callbackValue, IncrementExpected);
- if (TestCounter::Event::Decrement == event)
+ if (RefCounterEvent::Decrement == event)
EXPECT_EQ(callbackValue, DecrementExpected);
// return the value of the counter in the callback.
callbackValue = counterPtr->value();