Source/WebCore:
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Feb 2016 18:20:07 +0000 (18:20 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Feb 2016 18:20:07 +0000 (18:20 +0000)
commit824cee53454974aacb688ffcc86b5b9a32f31dea
treee4f73e69a9ba8c350de051597858b072cae133b9
parente4914ea7a3ad26db02fab7e833f7c84adc030635
Source/WebCore:
RefCounter value changed callback should be called on all changes (not just zero edge).
https://bugs.webkit.org/show_bug.cgi?id=154699

Reviewed by Anders Carlsson.

RefCounter currently only triggers a callback when the count goes from zero
to non-zero and vice-versa. Change that, to be useful to more clients.

* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
    - Updated for change in RefCounter callback siganture.
* platform/VNodeTracker.cpp:
(WebCore::VNodeTracker::VNodeTracker):
    - Can now use RefCounter callback to trigger checkPressureState().
(WebCore::VNodeTracker::pressureWarningTimerFired):
    - RefCounter count is now a size_t (%d -> %ul).
* platform/VNodeTracker.h:
    - simplified VNodeTracker::token() [no longer needs to call checkPressureState()].

Source/WebKit2:
RefCounter value changed callback should be called on all changes (not just zero edge).
https://bugs.webkit.org/show_bug.cgi?id=154699

Reviewed by Anders Carlsson.

RefCounter currently only triggers a callback when the count goes from zero
to non-zero and vice-versa. Change that, to be useful to more clients.

* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::PluginProcessManager):
    - Updated for change in RefCounter callback siganture.
* UIProcess/Plugins/PluginProcessManager.h:
    - Updated for change in RefCounter callback siganture.
* UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
(WebKit::PluginProcessManager::updateProcessSuppressionDisabled):
    - updated logic for enabling process supression.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler):
    - Updated for change in RefCounter callback siganture.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
    - Updated for change in RefCounter callback siganture.

Source/WTF:
Unreviewed, rolling out r197168.
https://bugs.webkit.org/show_bug.cgi?id=154728

crashing on some devices (Requested by kling on #webkit).

Reverted changeset:

"[Darwin] Use vm_kernel_page_size for WTF::pageSize()."
https://bugs.webkit.org/show_bug.cgi?id=154726
http://trac.webkit.org/changeset/197168

Patch by Commit Queue <commit-queue@webkit.org> on 2016-02-26

Tools:
RefCounter value changed callback should be called on all changes (not just zero edge).
https://bugs.webkit.org/show_bug.cgi?id=154699

Reviewed by Geoff Garen.

RefCounter currently only triggers a callback when the count goes from zero
to non-zero and vice-versa. Change that, to be useful to more clients.

* TestWebKitAPI/Tests/WTF/RefCounter.cpp:
(TestWebKitAPI::TEST):
    - Updated for change in RefCounter callback siganture & behaviour.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/RefCounter.h
Source/WebCore/ChangeLog
Source/WebCore/page/PageThrottler.cpp
Source/WebCore/platform/VNodeTracker.cpp
Source/WebCore/platform/VNodeTracker.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp
Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h
Source/WebKit2/UIProcess/Plugins/mac/PluginProcessManagerMac.mm
Source/WebKit2/UIProcess/ProcessThrottler.cpp
Source/WebKit2/UIProcess/WebProcessPool.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp