Title: [121707] trunk/Source
Revision
121707
Author
[email protected]
Date
2012-07-02 14:47:42 -0700 (Mon, 02 Jul 2012)

Log Message

Do not do any logging initialization when logging is disabled
https://bugs.webkit.org/show_bug.cgi?id=90228

Patch by Benjamin Poulain <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121706 => 121707)


--- trunk/Source/WebCore/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,30 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         <rdar://problem/11787030> In vertical writing modes, child following float-clearing block has incorrect logical top

Modified: trunk/Source/WebCore/WebCore.exp.in (121706 => 121707)


--- trunk/Source/WebCore/WebCore.exp.in	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-07-02 21:47:42 UTC (rev 121707)
@@ -625,7 +625,6 @@
 __ZN7WebCore31CrossOriginPreflightResultCache6sharedEv
 __ZN7WebCore32plainTextToMallocAllocatedBufferEPKNS_5RangeERjbNS_20TextIteratorBehaviorE
 __ZN7WebCore33stripLeadingAndTrailingHTMLSpacesERKN3WTF6StringE
-__ZN7WebCore36initializeLoggingChannelsIfNecessaryEv
 __ZN7WebCore3macERKNS_10CredentialE
 __ZN7WebCore3macERKNS_23AuthenticationChallengeE
 __ZN7WebCore40restrictMinimumScaleFactorToViewportSizeERNS_18ViewportAttributesENS_7IntSizeE
@@ -1976,6 +1975,10 @@
 __ZNK7WebCore7Element26fastAttributeLookupAllowedERKNS_13QualifiedNameE
 #endif
 
+#if !LOG_DISABLED
+__ZN7WebCore36initializeLoggingChannelsIfNecessaryEv
+#endif // !LOG_DISABLED
+
 #if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) && !PLATFORM(IOS)
 __ZN7WebCore7IntSizeC1ERK7_NSSize
 __ZNK7WebCore7IntSizecv7_NSSizeEv

Modified: trunk/Source/WebCore/make-export-file-generator (121706 => 121707)


--- trunk/Source/WebCore/make-export-file-generator	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/make-export-file-generator	2012-07-02 21:47:42 UTC (rev 121707)
@@ -36,6 +36,7 @@
 TEMPLATE = <<-EOF
 #include "config.h"
 #include <stdio.h>
+#include <wtf/Assertions.h>
 
 int main(int, char**)
 {

Modified: trunk/Source/WebCore/platform/Logging.cpp (121706 => 121707)


--- trunk/Source/WebCore/platform/Logging.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/Logging.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -27,6 +27,8 @@
 #include "Logging.h"
 #include "PlatformString.h"
 
+#if !LOG_DISABLED
+
 namespace WebCore {
 
 WTFLogChannel LogNotYetImplemented = { 0x00000001, "WebCoreLogLevel", WTFLogChannelOff };
@@ -149,3 +151,5 @@
 }
 
 }
+
+#endif // !LOG_DISABLED

Modified: trunk/Source/WebCore/platform/Logging.h (121706 => 121707)


--- trunk/Source/WebCore/platform/Logging.h	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/Logging.h	2012-07-02 21:47:42 UTC (rev 121707)
@@ -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 @@
     WTFLogChannel* getChannelFromName(const String& channelName);
 }
 
+#endif // !LOG_DISABLED
+
 #endif // Logging_h

Modified: trunk/Source/WebCore/platform/blackberry/LoggingBlackBerry.cpp (121706 => 121707)


--- trunk/Source/WebCore/platform/blackberry/LoggingBlackBerry.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/blackberry/LoggingBlackBerry.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -19,6 +19,8 @@
 #include "config.h"
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -53,3 +55,5 @@
 }
 
 } // namespace WebCore
+
+#endif // !LOG_DISABLED

Modified: trunk/Source/WebCore/platform/efl/LoggingEfl.cpp (121706 => 121707)


--- trunk/Source/WebCore/platform/efl/LoggingEfl.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/efl/LoggingEfl.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -23,6 +23,8 @@
 #include "config.h"
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 #include "PlatformString.h"
 #include <Eina.h>
 
@@ -62,3 +64,5 @@
 }
 
 }
+
+#endif // !LOG_DISABLED

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (121706 => 121707)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1719,9 +1719,13 @@
             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);

Modified: trunk/Source/WebCore/platform/gtk/LoggingGtk.cpp (121706 => 121707)


--- trunk/Source/WebCore/platform/gtk/LoggingGtk.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/gtk/LoggingGtk.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -20,8 +20,10 @@
 
 #include "config.h"
 #include "Logging.h"
+
+#if !LOG_DISABLED
+
 #include "PlatformString.h"
-
 #include <glib.h>
 #include <string.h>
 
@@ -62,3 +64,5 @@
 }
 
 } // namespace WebCore
+
+#endif // !LOG_DISABLED

Modified: trunk/Source/WebCore/platform/mac/LoggingMac.mm (121706 => 121707)


--- trunk/Source/WebCore/platform/mac/LoggingMac.mm	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/mac/LoggingMac.mm	2012-07-02 21:47:42 UTC (rev 121707)
@@ -27,6 +27,8 @@
 
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 namespace WebCore {
 
 static inline void initializeWithUserDefault(WTFLogChannel& channel)
@@ -77,3 +79,5 @@
 }
 
 }
+
+#endif // !LOG_DISABLED

Modified: trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp (121706 => 121707)


--- trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -200,11 +200,13 @@
             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();

Modified: trunk/Source/WebCore/platform/qt/LoggingQt.cpp (121706 => 121707)


--- trunk/Source/WebCore/platform/qt/LoggingQt.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/qt/LoggingQt.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -20,6 +20,8 @@
 #include "config.h"
 #include "Logging.h"
 
+#if !LOG_DISABLED
+
 #include "PlatformString.h"
 #include <QDebug>
 #include <QStringList>
@@ -54,3 +56,5 @@
 }
 
 } // namespace WebCore
+
+#endif // !LOG_DISABLED

Modified: trunk/Source/WebCore/platform/win/LoggingWin.cpp (121706 => 121707)


--- trunk/Source/WebCore/platform/win/LoggingWin.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/win/LoggingWin.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -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 @@
 }
 
 } // namespace WebCore
+
+#endif // !LOG_DISABLED

Modified: trunk/Source/WebCore/platform/wx/LoggingWx.cpp (121706 => 121707)


--- trunk/Source/WebCore/platform/wx/LoggingWx.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebCore/platform/wx/LoggingWx.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -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 @@
 }
 
 }
+
+#endif // !LOG_DISABLED

Modified: trunk/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp (121706 => 121707)


--- trunk/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -60,8 +60,10 @@
     blackberryDebugInitialize();
 #endif
 
+#if !LOG_DISABLED
     // Turn on logging.
     initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
 
     // Initialize threading/
     JSC::initializeThreading();

Modified: trunk/Source/WebKit/blackberry/ChangeLog (121706 => 121707)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         Clear visited links when clearing history.

Modified: trunk/Source/WebKit/chromium/ChangeLog (121706 => 121707)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         Unreviewed, rolling out r121650.

Modified: trunk/Source/WebKit/chromium/src/WebKit.cpp (121706 => 121707)


--- trunk/Source/WebKit/chromium/src/WebKit.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/chromium/src/WebKit.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -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 @@
 
 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)

Modified: trunk/Source/WebKit/efl/ChangeLog (121706 => 121707)


--- trunk/Source/WebKit/efl/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         [EFL] Rename NotificationPresenterEfl with NotificationClientEfl

Modified: trunk/Source/WebKit/efl/ewk/ewk_main.cpp (121706 => 121707)


--- trunk/Source/WebKit/efl/ewk/ewk_main.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/efl/ewk/ewk_main.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -146,7 +146,9 @@
             "work (ie: Adobe Flash)");
 
     WebCore::ScriptController::initializeThreading();
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
     WebCore::Settings::setDefaultMinDOMTimerInterval(0.004);
 
     PlatformStrategiesEfl::initialize();

Modified: trunk/Source/WebKit/gtk/ChangeLog (121706 => 121707)


--- trunk/Source/WebKit/gtk/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/gtk/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         [GTK] Enable CSS grid layout LayoutTests on GTK+

Modified: trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp (121706 => 121707)


--- trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -504,7 +504,9 @@
     JSC::initializeThreading();
     WTF::initializeMainThread();
 
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
     PlatformStrategiesGtk::initialize();
 
     // We make sure the text codecs have been initialized, because

Modified: trunk/Source/WebKit/mac/ChangeLog (121706 => 121707)


--- trunk/Source/WebKit/mac/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,19 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         Make the "Inspect Element" context menu item appear in nightly builds again.

Modified: trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm (121706 => 121707)


--- trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm	2012-07-02 21:47:42 UTC (rev 121707)
@@ -441,7 +441,7 @@
     ASSERT(size.width);
     ASSERT(size.height);
     
-#if !LOG_DISABLED        
+#if !LOG_DISABLED
     double start = CFAbsoluteTimeGetCurrent();
 #endif
     

Modified: trunk/Source/WebKit/mac/Misc/WebKitLogging.h (121706 => 121707)


--- trunk/Source/WebKit/mac/Misc/WebKitLogging.h	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/mac/Misc/WebKitLogging.h	2012-07-02 21:47:42 UTC (rev 121707)
@@ -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 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.

Modified: trunk/Source/WebKit/mac/Misc/WebKitLogging.m (121706 => 121707)


--- trunk/Source/WebKit/mac/Misc/WebKitLogging.m	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/mac/Misc/WebKitLogging.m	2012-07-02 21:47:42 UTC (rev 121707)
@@ -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 @@
     initializeLogChannel(&WebKitLogIconDatabase);
     initializeLogChannel(&WebKitLogTextInput);
 }
+#endif // !LOG_DISABLED
 
 void ReportDiscardedDelegateException(SEL delegateSelector, id exception)
 {

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (121706 => 121707)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2012-07-02 21:47:42 UTC (rev 121707)
@@ -6140,7 +6140,7 @@
 - (NSAttributedString *)_attributeStringFromDOMRange:(DOMRange *)range
 {
     NSAttributedString *attributedString;
-#if !LOG_DISABLED        
+#if !LOG_DISABLED
     double start = CFAbsoluteTimeGetCurrent();
 #endif    
     attributedString = [[[NSAttributedString alloc] _initWithDOMRange:range] autorelease];

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (121706 => 121707)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2012-07-02 21:47:42 UTC (rev 121707)
@@ -723,8 +723,10 @@
 
     static bool didOneTimeInitialization = false;
     if (!didOneTimeInitialization) {
+#if !LOG_DISABLED
         WebKitInitializeLoggingChannelsIfNecessary();
         WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
         [WebHistoryItem initWindowWatcherIfNecessary];
 #if ENABLE(SQL_DATABASE)
         WebKitInitializeDatabasesIfNecessary();

Modified: trunk/Source/WebKit/qt/ChangeLog (121706 => 121707)


--- trunk/Source/WebKit/qt/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         Don't hardcode target dpi of 160 (it should be 96 on desktop)

Modified: trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp (121706 => 121707)


--- trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -66,7 +66,9 @@
     if (initialized)
         return;
 
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
     ScriptController::initializeThreading();
     WTF::initializeMainThread();
     WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);

Modified: trunk/Source/WebKit/win/ChangeLog (121706 => 121707)


--- trunk/Source/WebKit/win/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/win/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         [CSS Regions] Adding feature defines for CSS Regions for Windows

Modified: trunk/Source/WebKit/win/WebView.cpp (121706 => 121707)


--- trunk/Source/WebKit/win/WebView.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/win/WebView.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -2641,7 +2641,9 @@
 
     static bool didOneTimeInitialization;
     if (!didOneTimeInitialization) {
+#if !LOG_DISABLED
         initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
 #if ENABLE(SQL_DATABASE)
         WebKitInitializeWebDatabasesIfNecessary();
 #endif

Modified: trunk/Source/WebKit/wx/ChangeLog (121706 => 121707)


--- trunk/Source/WebKit/wx/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/wx/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,13 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac

Modified: trunk/Source/WebKit/wx/WebView.cpp (121706 => 121707)


--- trunk/Source/WebKit/wx/WebView.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit/wx/WebView.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -389,7 +389,9 @@
 
     m_impl = new WebViewPrivate();
 
-    WebCore::initializeLoggingChannelsIfNecessary();    
+#if !LOG_DISABLED
+    WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
     WebCore::HTMLFrameOwnerElement* parentFrame = 0;
 
     WebCore::EditorClientWx* editorClient = new WebCore::EditorClientWx();

Modified: trunk/Source/WebKit2/ChangeLog (121706 => 121707)


--- trunk/Source/WebKit2/ChangeLog	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit2/ChangeLog	2012-07-02 21:47:42 UTC (rev 121707)
@@ -1,3 +1,17 @@
+2012-07-02  Benjamin Poulain  <[email protected]>
+
+        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  <[email protected]>
 
         [Qt][WK2] New API tests introduced in r121620 fail

Modified: trunk/Source/WebKit2/Platform/Logging.cpp (121706 => 121707)


--- trunk/Source/WebKit2/Platform/Logging.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit2/Platform/Logging.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -90,4 +90,4 @@
 
 } // namespace WebKit
 
-#endif // LOG_DISABLED
+#endif // !LOG_DISABLED

Modified: trunk/Source/WebKit2/Platform/Logging.h (121706 => 121707)


--- trunk/Source/WebKit2/Platform/Logging.h	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit2/Platform/Logging.h	2012-07-02 21:47:42 UTC (rev 121707)
@@ -52,6 +52,6 @@
 
 } // namespace WebKit
 
-#endif // LOG_DISABLED
+#endif // !LOG_DISABLED
 
 #endif // Logging_h

Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (121706 => 121707)


--- trunk/Source/WebKit2/UIProcess/WebContext.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -157,7 +157,9 @@
 
     addLanguageChangeObserver(this, languageChanged);
 
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
 
 #ifndef NDEBUG
     webContextCounter.increment();

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (121706 => 121707)


--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2012-07-02 21:27:29 UTC (rev 121706)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2012-07-02 21:47:42 UTC (rev 121707)
@@ -161,7 +161,9 @@
     WebPlatformStrategies::initialize();
 #endif // USE(PLATFORM_STRATEGIES)
 
+#if !LOG_DISABLED
     WebCore::initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
 }
 
 void WebProcess::initialize(CoreIPC::Connection::Identifier serverIdentifier, RunLoop* runLoop)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to