WebKit Bugzilla
Attachment 341204 Details for
Bug 185951
: Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185951-20180524102346.patch (text/plain), 9.56 KB, created by
Chris Dumez
on 2018-05-24 10:23:47 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-05-24 10:23:47 PDT
Size:
9.56 KB
patch
obsolete
>Subversion Revision: 232125 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 894ae700af9d610da747ec7560936e244b7e4c75..d568bdef102db78178fdbfde0d70336f0e4a9b2b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-05-24 Chris Dumez <cdumez@apple.com> >+ >+ Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds >+ https://bugs.webkit.org/show_bug.cgi?id=185951 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds and slows down >+ launch time. In particular, it is unnecessary to read NSDefaults to figure out which logging channels >+ should be enabled. >+ >+ * platform/mac/LoggingMac.mm: >+ (WebCore::logLevelString): >+ * platform/unix/LoggingUnix.cpp: >+ (WebCore::logLevelString): >+ * platform/win/LoggingWin.cpp: >+ (WebCore::logLevelString): >+ > 2018-05-23 Chris Dumez <cdumez@apple.com> > > RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its cross-origin parent >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 8c70e9ffd524b383fba0f6ca44022cbc0d14f70d..683d9657420fa161d16c9aca192d5fcd39353e0d 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,21 @@ >+2018-05-24 Chris Dumez <cdumez@apple.com> >+ >+ Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds >+ https://bugs.webkit.org/show_bug.cgi?id=185951 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds and slows down >+ launch time. In particular, it is unnecessary to read NSDefaults to figure out which logging channels >+ should be enabled. >+ >+ * pal/cocoa/LoggingCocoa.mm: >+ (PAL::logLevelString): >+ * pal/unix/LoggingUnix.cpp: >+ (PAL::logLevelString): >+ * pal/win/LoggingWin.cpp: >+ (PAL::logLevelString): >+ > 2018-05-22 Simon Fraser <simon.fraser@apple.com> > > Add notifyutil callbacks to dump the memory cache, and the list of live Pages and Documents >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 28edc121fb15a8f0eb2d55a69bcdbd5d0cc360e3..e2b53a6fe70e957f90c3ea615ebf63a24971b0fc 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,21 @@ >+2018-05-24 Chris Dumez <cdumez@apple.com> >+ >+ Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds >+ https://bugs.webkit.org/show_bug.cgi?id=185951 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds and slows down >+ launch time. In particular, it is unnecessary to read NSDefaults to figure out which logging channels >+ should be enabled. >+ >+ * Platform/foundation/LoggingFoundation.mm: >+ (WebKit::logLevelString): >+ * Platform/unix/LoggingUnix.cpp: >+ (WebKit::logLevelString): >+ * Platform/win/LoggingWin.cpp: >+ (WebKit::logLevelString): >+ > 2018-05-23 Youenn Fablet <youenn@apple.com> > > NetworkLoadChecker should check cached redirections >diff --git a/Source/WebCore/PAL/pal/cocoa/LoggingCocoa.mm b/Source/WebCore/PAL/pal/cocoa/LoggingCocoa.mm >index 62e39d1592ca7113269c5526ec20e88ae308d813..2cdcea222ff736ebd32c3bf5886b0f10c18a4680 100644 >--- a/Source/WebCore/PAL/pal/cocoa/LoggingCocoa.mm >+++ b/Source/WebCore/PAL/pal/cocoa/LoggingCocoa.mm >@@ -32,11 +32,14 @@ > > namespace PAL { > >-static NSString * const defaultsDomain = @"PALLogging"; >- > String logLevelString() > { >+#if !LOG_DISABLED >+ static NSString * const defaultsDomain = @"PALLogging"; > return [[NSUserDefaults standardUserDefaults] stringForKey:defaultsDomain]; >+#else >+ return String(); >+#endif > } > > } >diff --git a/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp b/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp >index 1335d05c652b79d3c5fd9466408f6a8f78234c23..24e22515f4d3ebee104c071c758350317a06fe73 100644 >--- a/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp >+++ b/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp >@@ -34,6 +34,7 @@ namespace PAL { > > String logLevelString() > { >+#if !LOG_DISABLED > if (char* logEnv = getenv("WEBKIT_DEBUG")) { > > #if defined(NDEBUG) >@@ -43,7 +44,7 @@ String logLevelString() > // To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1. > return ASCIILiteral("NotYetImplemented,") + String(logEnv); > } >- >+#endif > return String(); > } > >diff --git a/Source/WebCore/PAL/pal/win/LoggingWin.cpp b/Source/WebCore/PAL/pal/win/LoggingWin.cpp >index 95cc8d3c72aee661759c60fe478ad3a5116585b7..6b232c4db4876527c73595caf8d1669a93eae048 100644 >--- a/Source/WebCore/PAL/pal/win/LoggingWin.cpp >+++ b/Source/WebCore/PAL/pal/win/LoggingWin.cpp >@@ -34,10 +34,10 @@ > > namespace PAL { > >-static char * const loggingEnvironmentVariable = "WebCoreLogging"; >- > String logLevelString() > { >+#if !LOG_DISABLED >+ static char* const loggingEnvironmentVariable = "WebCoreLogging"; > DWORD length = GetEnvironmentVariableA(loggingEnvironmentVariable, 0, 0); > if (!length) > return emptyString(); >@@ -48,6 +48,9 @@ String logLevelString() > return emptyString(); > > return String(buffer.data()); >+#else >+ return String(); >+#endif > } > > } >diff --git a/Source/WebCore/platform/mac/LoggingMac.mm b/Source/WebCore/platform/mac/LoggingMac.mm >index b208bbe18053ba0821c43aa1fc5ea94c298e38aa..3b7591071e23717864e8ec14911e4d7c4ed16a13 100644 >--- a/Source/WebCore/platform/mac/LoggingMac.mm >+++ b/Source/WebCore/platform/mac/LoggingMac.mm >@@ -32,11 +32,14 @@ > > namespace WebCore { > >-static NSString * const defaultsDomain = @"WebCoreLogging"; >- > String logLevelString() > { >+#if !LOG_DISABLED >+ static NSString * const defaultsDomain = @"WebCoreLogging"; > return [[NSUserDefaults standardUserDefaults] stringForKey:defaultsDomain]; >+#else >+ return String(); >+#endif > } > > } >diff --git a/Source/WebCore/platform/unix/LoggingUnix.cpp b/Source/WebCore/platform/unix/LoggingUnix.cpp >index c4d576fd111a3676bac0f4c587fb05272cbdf90b..b72ad238fa21d6f35eabd741dbb501a9431cec76 100644 >--- a/Source/WebCore/platform/unix/LoggingUnix.cpp >+++ b/Source/WebCore/platform/unix/LoggingUnix.cpp >@@ -31,6 +31,7 @@ namespace WebCore { > > String logLevelString() > { >+#if !LOG_DISABLED > char* logEnv = getenv("WEBKIT_DEBUG"); > if (!logEnv) > return emptyString(); >@@ -42,6 +43,9 @@ String logLevelString() > > // To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1. > return String("NotYetImplemented,") + logEnv; >+#else >+ return String(); >+#endif > } > > } // namespace WebCore >diff --git a/Source/WebCore/platform/win/LoggingWin.cpp b/Source/WebCore/platform/win/LoggingWin.cpp >index 35d7698d9ddbfe5d6822d0ad2051765826abd527..e6c444ecac7a2f93fe290f332e0903dc4646da6e 100644 >--- a/Source/WebCore/platform/win/LoggingWin.cpp >+++ b/Source/WebCore/platform/win/LoggingWin.cpp >@@ -34,10 +34,10 @@ > > namespace WebCore { > >-static char * const loggingEnvironmentVariable = "WebCoreLogging"; >- > String logLevelString() > { >+#if !LOG_DISABLED >+ static char* const loggingEnvironmentVariable = "WebCoreLogging"; > DWORD length = GetEnvironmentVariableA(loggingEnvironmentVariable, 0, 0); > if (!length) > return emptyString(); >@@ -48,6 +48,9 @@ String logLevelString() > return emptyString(); > > return String(buffer.data()); >+#else >+ return String(); >+#endif > } > > } // namespace WebCore >diff --git a/Source/WebKit/Platform/foundation/LoggingFoundation.mm b/Source/WebKit/Platform/foundation/LoggingFoundation.mm >index 26f3731a628e1fe26db6b0ebf6a9b17576cdf3e6..38380ee9caf12316ec7f267e94184fe35217f4db 100644 >--- a/Source/WebKit/Platform/foundation/LoggingFoundation.mm >+++ b/Source/WebKit/Platform/foundation/LoggingFoundation.mm >@@ -31,11 +31,14 @@ namespace WebKit { > > #if !LOG_DISABLED || !RELEASE_LOG_DISABLED > >-static NSString * const defaultsDomain = @"WebKit2Logging"; >- > String logLevelString() > { >+#if !LOG_DISABLED >+ static NSString * const defaultsDomain = @"WebKit2Logging"; > return [[NSUserDefaults standardUserDefaults] stringForKey:defaultsDomain]; >+#else >+ return String(); >+#endif > } > > #endif >diff --git a/Source/WebKit/Platform/unix/LoggingUnix.cpp b/Source/WebKit/Platform/unix/LoggingUnix.cpp >index 8014a5dcfa8d0add6afd6c1482008cf0f226ba14..5b17b3bd8de3f548bf7690c1893d99fe1eb6d022 100644 >--- a/Source/WebKit/Platform/unix/LoggingUnix.cpp >+++ b/Source/WebKit/Platform/unix/LoggingUnix.cpp >@@ -33,7 +33,11 @@ namespace WebKit { > > String logLevelString() > { >+#if !LOG_DISABLED > return getenv("WEBKIT_DEBUG"); >+#else >+ return String(); >+#endif > } > > #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED >diff --git a/Source/WebKit/Platform/win/LoggingWin.cpp b/Source/WebKit/Platform/win/LoggingWin.cpp >index e4ed96bb1a54c87c3674d3a196af7178608364b8..69b0a5c910fbdaf3d38ffc2706a0e40f8204fe53 100644 >--- a/Source/WebKit/Platform/win/LoggingWin.cpp >+++ b/Source/WebKit/Platform/win/LoggingWin.cpp >@@ -35,10 +35,11 @@ > > namespace WebKit { > >-static char* const loggingEnvironmentVariable = "WebKitLogging"; >- > String logLevelString() > { >+#if !LOG_DISABLED >+ static char* const loggingEnvironmentVariable = "WebKitLogging"; >+ > DWORD length = GetEnvironmentVariableA(loggingEnvironmentVariable, 0, 0); > if (!length) > return emptyString(); >@@ -49,6 +50,9 @@ String logLevelString() > return emptyString(); > > return String(buffer.data()); >+#else >+ return String(); >+#endif > } > > } // namespace WebKit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185951
: 341204