Access GCController instance via GCController::singleton() instead of a free function
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jun 2015 00:28:19 +0000 (00:28 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jun 2015 00:28:19 +0000 (00:28 +0000)
commitf085d730562694724b9e0be87acca289c5f29c58
tree809783a27c8e2ce98e2151c8b007135daae56eea
parentf4ef491f2a35cb70f2d7cc03cef5cbf5a6e3f521
Access GCController instance via GCController::singleton() instead of a free function
https://bugs.webkit.org/show_bug.cgi?id=145776

Reviewed by Darin Adler.

Access GCController instance via GCController::singleton() instead of a
free function as per coding style and for consistency with other
singleton classes in the codebase.

Source/WebCore:

* bindings/js/GCController.cpp:
(WebCore::GCController::singleton):
(WebCore::gcController): Deleted.
* bindings/js/GCController.h:
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::setWindow):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::clear):
* bindings/js/ScriptController.cpp:
(WebCore::collectGarbageAfterWindowShellDestruction):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):

Source/WebKit/mac:

* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics garbageCollectJavaScriptObjects]):
(+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
(+[WebCoreStatistics setJavaScriptGarbageCollectorTimerEnabled:]):
* WebView/WebView.mm:
(+[WebView garbageCollectNow]):
(+[WebView discardAllCompiledCode]):
(-[WebView _close]):

Source/WebKit/win:

* WebCoreStatistics.cpp:
(WebCoreStatistics::garbageCollectJavaScriptObjects):
(WebCoreStatistics::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
(WebCoreStatistics::setJavaScriptGarbageCollectorTimerEnabled):
* WebJavaScriptCollector.cpp:
(WebJavaScriptCollector::collect):
(WebJavaScriptCollector::collectOnAlternateThread):

Source/WebKit2:

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::garbageCollectJavaScriptObjects):
(WebKit::InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::terminate):
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::garbageCollectJavaScriptObjects):
(WebKit::WebProcess::setJavaScriptGarbageCollectorTimerEnabled):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/GCController.cpp
Source/WebCore/bindings/js/GCController.h
Source/WebCore/bindings/js/JSDOMWindowShell.cpp
Source/WebCore/bindings/js/ScriptCachedFrameData.cpp
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/platform/MemoryPressureHandler.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebCoreStatistics.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreStatistics.cpp
Source/WebKit/win/WebJavaScriptCollector.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/WebProcess.cpp