Title: [223241] trunk/Source/WebCore/PAL
Revision
223241
Author
[email protected]
Date
2017-10-12 11:21:05 -0700 (Thu, 12 Oct 2017)

Log Message

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

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (223240 => 223241)


--- trunk/Source/WebCore/PAL/ChangeLog	2017-10-12 17:42:12 UTC (rev 223240)
+++ trunk/Source/WebCore/PAL/ChangeLog	2017-10-12 18:21:05 UTC (rev 223241)
@@ -1,3 +1,14 @@
+2017-10-12  Myles C. Maxfield  <[email protected]>
+
+        [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  <[email protected]>
 
         Allow PAL to log messages

Modified: trunk/Source/WebCore/PAL/pal/PlatformWin.cmake (223240 => 223241)


--- trunk/Source/WebCore/PAL/pal/PlatformWin.cmake	2017-10-12 17:42:12 UTC (rev 223240)
+++ trunk/Source/WebCore/PAL/pal/PlatformWin.cmake	2017-10-12 18:21:05 UTC (rev 223241)
@@ -6,6 +6,8 @@
     system/win/SoundWin.cpp
 
     text/KillRing.cpp
+
+    win/LoggingWin.cpp
 )
 
 list(APPEND PAL_INCLUDE_DIRECTORIES

Added: trunk/Source/WebCore/PAL/pal/win/LoggingWin.cpp (0 => 223241)


--- trunk/Source/WebCore/PAL/pal/win/LoggingWin.cpp	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/win/LoggingWin.cpp	2017-10-12 18:21:05 UTC (rev 223241)
@@ -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
Property changes on: trunk/Source/WebCore/PAL/pal/win/LoggingWin.cpp
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to