Diff
Modified: trunk/Source/WebCore/ChangeLog (232157 => 232158)
--- trunk/Source/WebCore/ChangeLog 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebCore/ChangeLog 2018-05-24 19:23:00 UTC (rev 232158)
@@ -1,5 +1,23 @@
2018-05-24 Chris Dumez <[email protected]>
+ Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds
+ https://bugs.webkit.org/show_bug.cgi?id=185951
+
+ Reviewed by Geoffrey Garen.
+
+ 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-24 Chris Dumez <[email protected]>
+
[iOS WK2] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=181499
<rdar://problem/36443428>
Modified: trunk/Source/WebCore/PAL/ChangeLog (232157 => 232158)
--- trunk/Source/WebCore/PAL/ChangeLog 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebCore/PAL/ChangeLog 2018-05-24 19:23:00 UTC (rev 232158)
@@ -1,3 +1,21 @@
+2018-05-24 Chris Dumez <[email protected]>
+
+ Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds
+ https://bugs.webkit.org/show_bug.cgi?id=185951
+
+ Reviewed by Geoffrey Garen.
+
+ 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 <[email protected]>
Add notifyutil callbacks to dump the memory cache, and the list of live Pages and Documents
Modified: trunk/Source/WebCore/PAL/pal/cocoa/LoggingCocoa.mm (232157 => 232158)
--- trunk/Source/WebCore/PAL/pal/cocoa/LoggingCocoa.mm 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebCore/PAL/pal/cocoa/LoggingCocoa.mm 2018-05-24 19:23:00 UTC (rev 232158)
@@ -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
}
}
Modified: trunk/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp (232157 => 232158)
--- trunk/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp 2018-05-24 19:23:00 UTC (rev 232158)
@@ -34,6 +34,7 @@
String logLevelString()
{
+#if !LOG_DISABLED
if (char* logEnv = getenv("WEBKIT_DEBUG")) {
#if defined(NDEBUG)
@@ -43,7 +44,7 @@
// To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1.
return ASCIILiteral("NotYetImplemented,") + String(logEnv);
}
-
+#endif
return String();
}
Modified: trunk/Source/WebCore/PAL/pal/win/LoggingWin.cpp (232157 => 232158)
--- trunk/Source/WebCore/PAL/pal/win/LoggingWin.cpp 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebCore/PAL/pal/win/LoggingWin.cpp 2018-05-24 19:23:00 UTC (rev 232158)
@@ -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 @@
return emptyString();
return String(buffer.data());
+#else
+ return String();
+#endif
}
}
Modified: trunk/Source/WebCore/platform/mac/LoggingMac.mm (232157 => 232158)
--- trunk/Source/WebCore/platform/mac/LoggingMac.mm 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebCore/platform/mac/LoggingMac.mm 2018-05-24 19:23:00 UTC (rev 232158)
@@ -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
}
}
Modified: trunk/Source/WebCore/platform/unix/LoggingUnix.cpp (232157 => 232158)
--- trunk/Source/WebCore/platform/unix/LoggingUnix.cpp 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebCore/platform/unix/LoggingUnix.cpp 2018-05-24 19:23:00 UTC (rev 232158)
@@ -31,6 +31,7 @@
String logLevelString()
{
+#if !LOG_DISABLED
char* logEnv = getenv("WEBKIT_DEBUG");
if (!logEnv)
return emptyString();
@@ -42,6 +43,9 @@
// To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1.
return String("NotYetImplemented,") + logEnv;
+#else
+ return String();
+#endif
}
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/win/LoggingWin.cpp (232157 => 232158)
--- trunk/Source/WebCore/platform/win/LoggingWin.cpp 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebCore/platform/win/LoggingWin.cpp 2018-05-24 19:23:00 UTC (rev 232158)
@@ -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 @@
return emptyString();
return String(buffer.data());
+#else
+ return String();
+#endif
}
} // namespace WebCore
Modified: trunk/Source/WebKit/ChangeLog (232157 => 232158)
--- trunk/Source/WebKit/ChangeLog 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebKit/ChangeLog 2018-05-24 19:23:00 UTC (rev 232158)
@@ -1,3 +1,21 @@
+2018-05-24 Chris Dumez <[email protected]>
+
+ Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds
+ https://bugs.webkit.org/show_bug.cgi?id=185951
+
+ Reviewed by Geoffrey Garen.
+
+ 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-24 Per Arne Vollan <[email protected]>
Crash under WebKit::PluginProxy::destroy()
Modified: trunk/Source/WebKit/Platform/foundation/LoggingFoundation.mm (232157 => 232158)
--- trunk/Source/WebKit/Platform/foundation/LoggingFoundation.mm 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebKit/Platform/foundation/LoggingFoundation.mm 2018-05-24 19:23:00 UTC (rev 232158)
@@ -31,11 +31,14 @@
#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
Modified: trunk/Source/WebKit/Platform/unix/LoggingUnix.cpp (232157 => 232158)
--- trunk/Source/WebKit/Platform/unix/LoggingUnix.cpp 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebKit/Platform/unix/LoggingUnix.cpp 2018-05-24 19:23:00 UTC (rev 232158)
@@ -33,7 +33,11 @@
String logLevelString()
{
+#if !LOG_DISABLED
return getenv("WEBKIT_DEBUG");
+#else
+ return String();
+#endif
}
#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebKit/Platform/win/LoggingWin.cpp (232157 => 232158)
--- trunk/Source/WebKit/Platform/win/LoggingWin.cpp 2018-05-24 19:13:28 UTC (rev 232157)
+++ trunk/Source/WebKit/Platform/win/LoggingWin.cpp 2018-05-24 19:23:00 UTC (rev 232158)
@@ -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 @@
return emptyString();
return String(buffer.data());
+#else
+ return String();
+#endif
}
} // namespace WebKit