Should template RefCounter instead of RefCounter::Token
https://bugs.webkit.org/show_bug.cgi?id=154691
Reviewed by Anders Carlsson.
Source/WebCore:
Mechanical update per RefCounter interface change.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::mediaActivityToken):
(WebCore::PageThrottler::pageLoadActivityToken):
(WebCore::PageThrottler::setActivityFlag):
* page/PageThrottler.h:
* platform/VNodeTracker.h:
Source/WebKit2:
Mechanical update per RefCounter interface change.
* UIProcess/Plugins/PluginProcessManager.h:
(WebKit::PluginProcessManager::processSuppressionDisabledToken):
(WebKit::PluginProcessManager::processSuppressionDisabled):
* UIProcess/ProcessThrottler.h:
(WebKit::ProcessThrottler::foregroundActivityToken):
(WebKit::ProcessThrottler::backgroundActivityToken):
* UIProcess/WebProcessPool.h:
Source/WTF:
My real goal here is to make the counter accurate. Currently returning a Token from token<>()
results in ref-count churn. Fixing this either means changing the return value, or improving
Token (which will probably mean replacing it with RefPtr). Either way would break the current
type checking. Move type tag to RefCount so this can still be enforced.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounter.cpp: Removed.
- Removed RefCounter.cpp.
* wtf/RefCounter.h:
(WTF::RefCounter::Token::Token):
(WTF::RefCounter::Token::operator bool):
(WTF::RefCounter::RefCounter):
(WTF::RefCounter::count):
(WTF::RefCounter::value):
(WTF::RefCounter<T>::Count::ref):
(WTF::RefCounter<T>::Count::deref):
(WTF::RefCounter<T>::RefCounter):
(WTF::RefCounter<T>::~RefCounter):
(WTF::RefCounter<T>::Token::Token):
(WTF::=):
(WTF::RefCounter::token): Deleted.
(WTF::RefCounter::Token<T>::Token): Deleted.
- RefCounter -> RefCounter<T>,
- Token<T> -> Token,
- renamed token<>() -> count().
Tools:
Mechanical update per RefCounter interface change.
* TestWebKitAPI/Tests/WTF/RefCounter.cpp:
(TestWebKitAPI::TEST):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@197132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed