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)
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

index 1f7c06b..fe21fbd 100644 (file)
@@ -1,3 +1,30 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        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:
+
 2012-07-02  Dan Bernstein  <mitz@apple.com>
 
         <rdar://problem/11787030> In vertical writing modes, child following float-clearing block has incorrect logical top
index 0af4748..e893974 100644 (file)
@@ -625,7 +625,6 @@ __ZN7WebCore31CrossOriginPreflightResultCache5emptyEv
 __ZN7WebCore31CrossOriginPreflightResultCache6sharedEv
 __ZN7WebCore32plainTextToMallocAllocatedBufferEPKNS_5RangeERjbNS_20TextIteratorBehaviorE
 __ZN7WebCore33stripLeadingAndTrailingHTMLSpacesERKN3WTF6StringE
-__ZN7WebCore36initializeLoggingChannelsIfNecessaryEv
 __ZN7WebCore3macERKNS_10CredentialE
 __ZN7WebCore3macERKNS_23AuthenticationChallengeE
 __ZN7WebCore40restrictMinimumScaleFactorToViewportSizeERNS_18ViewportAttributesENS_7IntSizeE
@@ -1976,6 +1975,10 @@ __ZN7WebCore20LogNotYetImplementedE
 __ZNK7WebCore7Element26fastAttributeLookupAllowedERKNS_13QualifiedNameE
 #endif
 
+#if !LOG_DISABLED
+__ZN7WebCore36initializeLoggingChannelsIfNecessaryEv
+#endif // !LOG_DISABLED
+
 #if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) && !PLATFORM(IOS)
 __ZN7WebCore7IntSizeC1ERK7_NSSize
 __ZNK7WebCore7IntSizecv7_NSSizeEv
index 7ee14c9..c9ff304 100755 (executable)
@@ -36,6 +36,7 @@ end
 TEMPLATE = <<-EOF
 #include "config.h"
 #include <stdio.h>
+#include <wtf/Assertions.h>
 
 int main(int, char**)
 {
index 34637a7..6e788d6 100644 (file)
@@ -27,6 +27,8 @@
 #include "Logging.h"
 #include "PlatformString.h"
 
+#if !LOG_DISABLED
+
 namespace WebCore {
 
 WTFLogChannel LogNotYetImplemented = { 0x00000001, "WebCoreLogLevel", WTFLogChannelOff };
@@ -149,3 +151,5 @@ WTFLogChannel* getChannelFromName(const String& channelName)
 }
 
 }
+
+#endif // !LOG_DISABLED
index 1af1c04..4330717 100644 (file)
@@ -29,6 +29,8 @@
 #include <wtf/Assertions.h>
 #include <wtf/Forward.h>
 
+#if !LOG_DISABLED
+
 #ifndef LOG_CHANNEL_PREFIX
 #define LOG_CHANNEL_PREFIX Log
 #endif
@@ -66,4 +68,6 @@ namespace WebCore {
     WTFLogChannel* getChannelFromName(const String& channelName);
 }
 
+#endif // !LOG_DISABLED
+
 #endif // Logging_h
index 994d78e..1d665bc 100644 (file)
@@ -19,6 +19,8 @@
 #include "config.h"
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -53,3 +55,5 @@ void initializeLoggingChannelsIfNecessary()
 }
 
 } // namespace WebCore
+
+#endif // !LOG_DISABLED
index bd71148..79cf004 100644 (file)
@@ -23,6 +23,8 @@
 #include "config.h"
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 #include "PlatformString.h"
 #include <Eina.h>
 
@@ -62,3 +64,5 @@ void initializeLoggingChannelsIfNecessary()
 }
 
 }
+
+#endif // !LOG_DISABLED
index e9d1bc1..132db0d 100644 (file)
@@ -1719,9 +1719,13 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
             g_object_set(m_fpsSink, "silent", TRUE , NULL);
 
             // Turn off text overlay unless logging is enabled.
+#if LOG_DISABLED
+            g_object_set(m_fpsSink, "text-overlay", FALSE , NULL);
+#else
             WTFLogChannel* channel = getChannelFromName("Media");
             if (channel->state != WTFLogChannelOn)
                 g_object_set(m_fpsSink, "text-overlay", FALSE , NULL);
+#endif // LOG_DISABLED
 
             if (g_object_class_find_property(G_OBJECT_GET_CLASS(m_fpsSink), "video-sink")) {
                 g_object_set(m_fpsSink, "video-sink", m_webkitVideoSink, NULL);
index 588ed7c..f16a1b2 100644 (file)
 
 #include "config.h"
 #include "Logging.h"
-#include "PlatformString.h"
 
+#if !LOG_DISABLED
+
+#include "PlatformString.h"
 #include <glib.h>
 #include <string.h>
 
@@ -62,3 +64,5 @@ void initializeLoggingChannelsIfNecessary()
 }
 
 } // namespace WebCore
+
+#endif // !LOG_DISABLED
index 4c9b303..fa007ec 100644 (file)
@@ -27,6 +27,8 @@
 
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 namespace WebCore {
 
 static inline void initializeWithUserDefault(WTFLogChannel& channel)
@@ -77,3 +79,5 @@ void initializeLoggingChannelsIfNecessary()
 }
 
 }
+
+#endif // !LOG_DISABLED
index 1a08e5b..60e4e15 100644 (file)
@@ -200,11 +200,13 @@ static void ensureSessionIsInitialized(SoupSession* session)
             setSoupCookieJar(jar);
     }
 
+#if !LOG_DISABLED
     if (!soup_session_get_feature(session, SOUP_TYPE_LOGGER) && LogNetwork.state == WTFLogChannelOn) {
         SoupLogger* logger = soup_logger_new(static_cast<SoupLoggerLogLevel>(SOUP_LOGGER_LOG_BODY), -1);
         soup_session_add_feature(session, SOUP_SESSION_FEATURE(logger));
         g_object_unref(logger);
     }
+#endif // !LOG_DISABLED
 
     if (!soup_session_get_feature(session, SOUP_TYPE_REQUESTER)) {
         SoupRequester* requester = soup_requester_new();
index a9346de..8089e94 100644 (file)
@@ -20,6 +20,8 @@
 #include "config.h"
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 #include "PlatformString.h"
 #include <QDebug>
 #include <QStringList>
@@ -54,3 +56,5 @@ void initializeLoggingChannelsIfNecessary()
 }
 
 } // namespace WebCore
+
+#endif // !LOG_DISABLED
index 0b0afad..6d353ed 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 #include "PlatformString.h"
 #include <windows.h>
 #include <wtf/OwnArrayPtr.h>
@@ -102,3 +104,5 @@ void initializeLoggingChannelsIfNecessary()
 }
 
 } // namespace WebCore
+
+#endif // !LOG_DISABLED
index 94893e9..86a47ac 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 #include "PlatformString.h"
 #include <wtf/Vector.h>
 #include <wtf/text/CString.h>
@@ -62,3 +64,5 @@ void initializeLoggingChannelsIfNecessary()
 }
 
 }
+
+#endif // !LOG_DISABLED
index a4c48a5..d6ec87f 100644 (file)
@@ -60,8 +60,10 @@ void globalInitialize()
     blackberryDebugInitialize();
 #endif
 
+#if !LOG_DISABLED
     // Turn on logging.
     initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
 
     // Initialize threading/
     JSC::initializeThreading();
index a142c0d..3b4ea0e 100644 (file)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        * Api/BlackBerryGlobal.cpp:
+        (BlackBerry::WebKit::globalInitialize):
+
 2012-07-01  George Staikos  <staikos@webkit.org>
 
         Clear visited links when clearing history.
index bbf8f7b..702c4b4 100644 (file)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        * src/WebKit.cpp:
+        (WebKit::enableLogChannel):
+
 2012-07-01  Keishi Hattori  <keishi@webkit.org>
 
         Unreviewed, rolling out r121650.
index 6106597..e483923 100644 (file)
@@ -50,6 +50,7 @@
 #include <wtf/Assertions.h>
 #include <wtf/MainThread.h>
 #include <wtf/Threading.h>
+#include <wtf/UnusedParam.h>
 #include <wtf/text/AtomicString.h>
 
 #if OS(DARWIN)
@@ -185,9 +186,13 @@ bool layoutTestMode()
 
 void enableLogChannel(const char* name)
 {
+#if !LOG_DISABLED
     WTFLogChannel* channel = WebCore::getChannelFromName(name);
     if (channel)
         channel->state = WTFLogChannelOn;
+#else
+    UNUSED_PARAM(name);
+#endif // !LOG_DISABLED
 }
 
 void resetPluginCache(bool reloadPages)
index 4591ff2..7dc9a22 100644 (file)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        * ewk/ewk_main.cpp:
+        (_ewk_init_body):
+
 2012-07-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         [EFL] Rename NotificationPresenterEfl with NotificationClientEfl
index 84d2b50..b48c28a 100644 (file)
@@ -146,7 +146,9 @@ Eina_Bool _ewk_init_body(void)
             "work (ie: Adobe Flash)");
 
     WebCore::ScriptController::initializeThreading();
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
     WebCore::Settings::setDefaultMinDOMTimerInterval(0.004);
 
     PlatformStrategiesEfl::initialize();
index 15f2933..b1a7c1c 100644 (file)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        * webkit/webkitglobals.cpp:
+        (webkitInit):
+
 2012-06-29  Tony Chang  <tony@chromium.org>
 
         [GTK] Enable CSS grid layout LayoutTests on GTK+
index 78a4949..42f7a1d 100644 (file)
@@ -504,7 +504,9 @@ void webkitInit()
     JSC::initializeThreading();
     WTF::initializeMainThread();
 
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
     PlatformStrategiesGtk::initialize();
 
     // We make sure the text codecs have been initialized, because
index 2a1c4b4..52fcf05 100644 (file)
@@ -1,3 +1,19 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        * Misc/WebIconDatabase.mm:
+        (-[WebIconDatabase _scaleIcon:toSize:]):
+        * Misc/WebKitLogging.h:
+        * Misc/WebKitLogging.m:
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _attributeStringFromDOMRange:]):
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+
 2012-07-01  Timothy Hatcher  <timothy@apple.com>
 
         Make the "Inspect Element" context menu item appear in nightly builds again.
index 4f8fc6e..fee30f7 100644 (file)
@@ -441,7 +441,7 @@ static WebIconDatabaseClient* defaultClient()
     ASSERT(size.width);
     ASSERT(size.height);
     
-#if !LOG_DISABLED        
+#if !LOG_DISABLED
     double start = CFAbsoluteTimeGetCurrent();
 #endif
     
index f71f730..5f3428d 100644 (file)
@@ -36,6 +36,7 @@
 extern "C" {
 #endif
 
+#if !LOG_DISABLED
 extern WTFLogChannel WebKitLogTiming;
 extern WTFLogChannel WebKitLogLoading;
 extern WTFLogChannel WebKitLogFontCache;
@@ -62,6 +63,7 @@ extern WTFLogChannel WebKitLogIconDatabase;
 extern WTFLogChannel WebKitLogTextInput;
 
 void WebKitInitializeLoggingChannelsIfNecessary(void);
+#endif // !LOG_DISABLED
 
 // FIXME: Why is this in the "logging" header file?
 // Use WebCoreThreadViolationCheck instead for checks that throw an exception even in production builds.
index 72a822f..e005fef 100644 (file)
@@ -28,6 +28,8 @@
 
 #import "WebKitLogging.h"
 
+#if !LOG_DISABLED
+
 WTFLogChannel WebKitLogTextInput =              { 0x00000010, "WebKitLogLevel", WTFLogChannelOff };
 WTFLogChannel WebKitLogTiming =                 { 0x00000020, "WebKitLogLevel", WTFLogChannelOff };
 WTFLogChannel WebKitLogLoading =                { 0x00000040, "WebKitLogLevel", WTFLogChannelOff };
@@ -98,6 +100,7 @@ void WebKitInitializeLoggingChannelsIfNecessary()
     initializeLogChannel(&WebKitLogIconDatabase);
     initializeLogChannel(&WebKitLogTextInput);
 }
+#endif // !LOG_DISABLED
 
 void ReportDiscardedDelegateException(SEL delegateSelector, id exception)
 {
index c431f9b..04a5a99 100644 (file)
@@ -6140,7 +6140,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
 - (NSAttributedString *)_attributeStringFromDOMRange:(DOMRange *)range
 {
     NSAttributedString *attributedString;
-#if !LOG_DISABLED        
+#if !LOG_DISABLED
     double start = CFAbsoluteTimeGetCurrent();
 #endif    
     attributedString = [[[NSAttributedString alloc] _initWithDOMRange:range] autorelease];
index 45a4cf5..23a78ff 100644 (file)
@@ -723,8 +723,10 @@ static bool shouldRespectPriorityInCSSAttributeSetters()
 
     static bool didOneTimeInitialization = false;
     if (!didOneTimeInitialization) {
+#if !LOG_DISABLED
         WebKitInitializeLoggingChannelsIfNecessary();
         WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
         [WebHistoryItem initWindowWatcherIfNecessary];
 #if ENABLE(SQL_DATABASE)
         WebKitInitializeDatabasesIfNecessary();
index 24ac90e..43533fb 100644 (file)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        * WebCoreSupport/InitWebCoreQt.cpp:
+        (WebCore::initializeWebCoreQt):
+
 2012-06-29  Konrad Piascik  <kpiascik@rim.com>
 
         Don't hardcode target dpi of 160 (it should be 96 on desktop)
index 452091c..5ac449d 100644 (file)
@@ -66,7 +66,9 @@ void initializeWebCoreQt()
     if (initialized)
         return;
 
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
     ScriptController::initializeThreading();
     WTF::initializeMainThread();
     WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);
index ebbb2fd..49deaf6 100644 (file)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        * WebView.cpp:
+        (WebView::initWithFrame):
+
 2012-06-29  Mihai Balan  <mibalan@adobe.com>
 
         [CSS Regions] Adding feature defines for CSS Regions for Windows
index 7ca9d15..a52ecc4 100644 (file)
@@ -2641,7 +2641,9 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
 
     static bool didOneTimeInitialization;
     if (!didOneTimeInitialization) {
+#if !LOG_DISABLED
         initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
 #if ENABLE(SQL_DATABASE)
         WebKitInitializeWebDatabasesIfNecessary();
 #endif
index 077cdd4..f0913c3 100644 (file)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        * WebView.cpp:
+        (WebKit::WebView::Create):
+
 2012-05-31  Hajime Morrita  <morrita@chromium.org>
 
         REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac
index addd11c..acb60f6 100644 (file)
@@ -389,7 +389,9 @@ bool WebView::Create(wxWindow* parent, const wxString& url, int id, const wxPoin
 
     m_impl = new WebViewPrivate();
 
-    WebCore::initializeLoggingChannelsIfNecessary();    
+#if !LOG_DISABLED
+    WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
     WebCore::HTMLFrameOwnerElement* parentFrame = 0;
 
     WebCore::EditorClientWx* editorClient = new WebCore::EditorClientWx();
index b1ea874..5a5c72a 100644 (file)
@@ -1,3 +1,17 @@
+2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
+
+        Do not do any logging initialization when logging is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=90228
+
+        Reviewed by Simon Fraser.
+
+        * Platform/Logging.cpp:
+        * Platform/Logging.h:
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::WebContext):
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::WebProcess):
+
 2012-07-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
 
         [Qt][WK2] New API tests introduced in r121620 fail
index f2318ec..33b4637 100644 (file)
@@ -90,4 +90,4 @@ void initializeLogChannelsIfNecessary()
 
 } // namespace WebKit
 
-#endif // LOG_DISABLED
+#endif // !LOG_DISABLED
index 06f9609..c47bfff 100644 (file)
@@ -52,6 +52,6 @@ WTFLogChannel* getChannelFromName(const String& channelName);
 
 } // namespace WebKit
 
-#endif // LOG_DISABLED
+#endif // !LOG_DISABLED
 
 #endif // Logging_h
index 742aea6..d53dc76 100644 (file)
@@ -157,7 +157,9 @@ WebContext::WebContext(ProcessModel processModel, const String& injectedBundlePa
 
     addLanguageChangeObserver(this, languageChanged);
 
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
 
 #ifndef NDEBUG
     webContextCounter.increment();
index 1424a1a..9f29aef 100644 (file)
@@ -161,7 +161,9 @@ WebProcess::WebProcess()
     WebPlatformStrategies::initialize();
 #endif // USE(PLATFORM_STRATEGIES)
 
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
 }
 
 void WebProcess::initialize(CoreIPC::Connection::Identifier serverIdentifier, RunLoop* runLoop)