Do not do any logging initialization when logging is disabled
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 21:47:42 +0000 (21:47 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 21:47:42 +0000 (21:47 +0000)
commitf3869e4399adf5770c8ceb15b84a2dbe77a1fe0c
treea0624073416951969e3b05c80c033f7d60dafff6
parent735352f6639ce64851a8f15a790ea9e98e7b5e41
Do not do any logging initialization when logging is disabled
https://bugs.webkit.org/show_bug.cgi?id=90228

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-07-02
Reviewed by Simon Fraser.

Source/WebCore:

Initializating of the logging channels was taking time on startup. When logging is disabled
(and the LOG macro does nothing), we should aslo disable logging channels and initialization.

This patch #ifdef the Logging initialization with the macro LOG_DISABLED.

* WebCore.exp.in:
* make-export-file-generator: Explicitely adds Assertions.h so that LOG_DISABLED is defined.
* platform/Logging.cpp:
* platform/Logging.h:
* platform/blackberry/LoggingBlackBerry.cpp:
* platform/efl/LoggingEfl.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/gtk/LoggingGtk.cpp:
* platform/mac/LoggingMac.mm:
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ensureSessionIsInitialized):
* platform/qt/LoggingQt.cpp:
* platform/win/LoggingWin.cpp:
* platform/wx/LoggingWx.cpp:

Source/WebKit/blackberry:

* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::globalInitialize):

Source/WebKit/chromium:

* src/WebKit.cpp:
(WebKit::enableLogChannel):

Source/WebKit/efl:

* ewk/ewk_main.cpp:
(_ewk_init_body):

Source/WebKit/gtk:

* webkit/webkitglobals.cpp:
(webkitInit):

Source/WebKit/mac:

* Misc/WebIconDatabase.mm:
(-[WebIconDatabase _scaleIcon:toSize:]):
* Misc/WebKitLogging.h:
* Misc/WebKitLogging.m:
* WebView/WebHTMLView.mm:
(-[WebHTMLView _attributeStringFromDOMRange:]):
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/qt:

* WebCoreSupport/InitWebCoreQt.cpp:
(WebCore::initializeWebCoreQt):

Source/WebKit/win:

* WebView.cpp:
(WebView::initWithFrame):

Source/WebKit/wx:

* WebView.cpp:
(WebKit::WebView::Create):

Source/WebKit2:

* Platform/Logging.cpp:
* Platform/Logging.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
39 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/make-export-file-generator
Source/WebCore/platform/Logging.cpp
Source/WebCore/platform/Logging.h
Source/WebCore/platform/blackberry/LoggingBlackBerry.cpp
Source/WebCore/platform/efl/LoggingEfl.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/gtk/LoggingGtk.cpp
Source/WebCore/platform/mac/LoggingMac.mm
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
Source/WebCore/platform/qt/LoggingQt.cpp
Source/WebCore/platform/win/LoggingWin.cpp
Source/WebCore/platform/wx/LoggingWx.cpp
Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebKit.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/ewk/ewk_main.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitglobals.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebIconDatabase.mm
Source/WebKit/mac/Misc/WebKitLogging.h
Source/WebKit/mac/Misc/WebKitLogging.m
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/Logging.cpp
Source/WebKit2/Platform/Logging.h
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/WebProcess/WebProcess.cpp