Title: [223293] tags/Safari-605.1.10.1/Source/WebCore/PAL
Revision
223293
Author
jmarc...@apple.com
Date
2017-10-13 11:43:55 -0700 (Fri, 13 Oct 2017)

Log Message

Cherry-pick r223241. rdar://problem/34974253

Modified Paths

Added Paths

Diff

Modified: tags/Safari-605.1.10.1/Source/WebCore/PAL/ChangeLog (223292 => 223293)


--- tags/Safari-605.1.10.1/Source/WebCore/PAL/ChangeLog	2017-10-13 18:42:46 UTC (rev 223292)
+++ tags/Safari-605.1.10.1/Source/WebCore/PAL/ChangeLog	2017-10-13 18:43:55 UTC (rev 223293)
@@ -1,3 +1,18 @@
+2017-10-13  Jason Marcell  <jmarc...@apple.com>
+
+        Cherry-pick r223241. rdar://problem/34974253
+
+    2017-10-12  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+            [Win] Build fix after r223206
+            https://bugs.webkit.org/show_bug.cgi?id=171523
+
+            Unreviewed.
+
+            * pal/PlatformWin.cmake:
+            * pal/win/LoggingWin.cpp: Added.
+            (PAL::logLevelString):
+
 2017-10-11  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Allow PAL to log messages

Modified: tags/Safari-605.1.10.1/Source/WebCore/PAL/pal/PlatformWin.cmake (223292 => 223293)


--- tags/Safari-605.1.10.1/Source/WebCore/PAL/pal/PlatformWin.cmake	2017-10-13 18:42:46 UTC (rev 223292)
+++ tags/Safari-605.1.10.1/Source/WebCore/PAL/pal/PlatformWin.cmake	2017-10-13 18:43:55 UTC (rev 223293)
@@ -6,6 +6,8 @@
     system/win/SoundWin.cpp
 
     text/KillRing.cpp
+
+    win/LoggingWin.cpp
 )
 
 list(APPEND PAL_INCLUDE_DIRECTORIES

Added: tags/Safari-605.1.10.1/Source/WebCore/PAL/pal/win/LoggingWin.cpp (0 => 223293)


--- tags/Safari-605.1.10.1/Source/WebCore/PAL/pal/win/LoggingWin.cpp	                        (rev 0)
+++ tags/Safari-605.1.10.1/Source/WebCore/PAL/pal/win/LoggingWin.cpp	2017-10-13 18:43:55 UTC (rev 223293)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008, 2013 2017, Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "Logging.h"
+
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
+
+#include <windows.h>
+#include <wtf/StdLibExtras.h>
+#include <wtf/text/WTFString.h>
+
+namespace PAL {
+
+static char * const loggingEnvironmentVariable = "WebCoreLogging";
+
+String logLevelString()
+{
+    DWORD length = GetEnvironmentVariableA(loggingEnvironmentVariable, 0, 0);
+    if (!length)
+        return emptyString();
+
+    auto buffer = std::make_unique<char[]>(length);
+
+    if (!GetEnvironmentVariableA(loggingEnvironmentVariable, buffer.get(), length))
+        return emptyString();
+
+    return String(buffer.get());
+}
+
+}
+
+#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to