Start using C++17
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2019 17:41:29 +0000 (17:41 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2019 17:41:29 +0000 (17:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197131

.:

Reviewed by Darin Adler.

* Source/cmake/OptionsMSVC.cmake:
* Source/cmake/WebKitCompilerFlags.cmake:

Source/bmalloc:

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:

Source/JavaScriptCore:

Reviewed by Darin Alder.

* Configurations/Base.xcconfig:

Source/ThirdParty:

Reviewed by Darin Adler.

* gtest/xcode/Config/General.xcconfig:

Source/ThirdParty/ANGLE:

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:

Source/ThirdParty/libwebrtc:

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:

Source/WebCore:

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:
* DerivedSources.make:

Source/WebCore/PAL:

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:

Source/WebInspectorUI:

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:

Source/WebKit:

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:
* DerivedSources.make:

Source/WebKitLegacy/mac:

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:

Source/WTF:

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:
* wtf/CMakeLists.txt:
* wtf/Variant.h:
(WTF::switchOn):

Tools:

Reviewed by Darin Adler.

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MobileMiniBrowser/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244653 268f45cc-cd09-0410-ab3c-d52691b4dbfc

36 files changed:
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/Base.xcconfig
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/Configurations/Base.xcconfig
Source/ThirdParty/ChangeLog
Source/ThirdParty/gtest/xcode/Config/General.xcconfig
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig
Source/WTF/ChangeLog
Source/WTF/Configurations/Base.xcconfig
Source/WTF/wtf/Variant.h
Source/WebCore/ChangeLog
Source/WebCore/Configurations/Base.xcconfig
Source/WebCore/DerivedSources.make
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/Base.xcconfig
Source/WebCore/platform/ios/LegacyTileGrid.mm
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Configurations/Base.xcconfig
Source/WebKit/ChangeLog
Source/WebKit/Configurations/Base.xcconfig
Source/WebKit/DerivedSources.make
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/Base.xcconfig
Source/bmalloc/ChangeLog
Source/bmalloc/Configurations/Base.xcconfig
Source/cmake/OptionsMSVC.cmake
Source/cmake/WebKitCompilerFlags.cmake
Tools/ChangeLog
Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
Tools/MiniBrowser/Configurations/Base.xcconfig
Tools/MobileMiniBrowser/Configurations/Base.xcconfig
Tools/TestWebKitAPI/Configurations/Base.xcconfig
Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm
Tools/WebKitTestRunner/Configurations/Base.xcconfig

index 68406ba..a83e570 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Source/cmake/OptionsMSVC.cmake:
+        * Source/cmake/WebKitCompilerFlags.cmake:
+
 2019-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Hardcoded text color in input fields
index fe358b1..0a85d70 100644 (file)
@@ -1,5 +1,14 @@
 2019-04-25  Alex Christensen  <achristensen@webkit.org>
 
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Alder.
+
+        * Configurations/Base.xcconfig:
+
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
         Remove DeprecatedOptional
         https://bugs.webkit.org/show_bug.cgi?id=197161
 
index c2cc867..6318db0 100644 (file)
@@ -33,7 +33,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
index 67e7c7b..40500c6 100644 (file)
@@ -1,3 +1,12 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+
 2019-03-22  Keith Rollin  <krollin@apple.com>
 
         Enable ThinLTO support in Production builds
index c1f1bfb..2a63090 100644 (file)
@@ -10,7 +10,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
index 224f979..5810b3b 100644 (file)
@@ -1,3 +1,12 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * gtest/xcode/Config/General.xcconfig:
+
 2018-10-30  Don Olmstead  <don.olmstead@sony.com>
 
         [PlayStation] Enable JavaScriptCore
index 53e03de..f5a43a0 100644 (file)
@@ -51,7 +51,7 @@ SEPARATE_STRIP = YES
 GCC_C_LANGUAGE_STANDARD = c99
 
 // Force C++14
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 
 // not sure why apple defaults this on, but it's pretty risky
 ALWAYS_SEARCH_USER_PATHS = NO
index bd2fd52..fcd9ea0 100644 (file)
@@ -1,3 +1,12 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+
 2019-04-23  Alex Christensen  <achristensen@webkit.org>
 
         Add unit tests for WKWebView.serverTrust
index e442099..769730f 100644 (file)
@@ -12,7 +12,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_ARC = YES;
 CLANG_ENABLE_OBJC_WEAK = YES;
index 3c4fa9f..1c8699c 100644 (file)
@@ -1,5 +1,17 @@
 2019-04-25  Alex Christensen  <achristensen@webkit.org>
 
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        * wtf/CMakeLists.txt:
+        * wtf/Variant.h:
+        (WTF::switchOn):
+
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
         Remove DeprecatedOptional
         https://bugs.webkit.org/show_bug.cgi?id=197161
 
index 9f7014a..3f853da 100644 (file)
@@ -33,7 +33,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_ARC = YES;
 CLANG_ENABLE_OBJC_WEAK = YES;
index f79cb1f..6b8e90e 100644 (file)
@@ -2044,9 +2044,9 @@ struct __hash_visitor{
 // -- WebKit Additions --
 
 template<class V, class... F>
-auto switchOn(V&& v, F&&... f) -> decltype(visit(makeVisitor(std::forward<F>(f)...), std::forward<V>(v)))
+auto switchOn(V&& v, F&&... f) -> decltype(WTF::visit(makeVisitor(std::forward<F>(f)...), std::forward<V>(v)))
 {
-    return visit(makeVisitor(std::forward<F>(f)...), std::forward<V>(v));
+    return WTF::visit(makeVisitor(std::forward<F>(f)...), std::forward<V>(v));
 }
 
 } // namespace WTF
index 5ac42ca..ab967c5 100644 (file)
@@ -1,3 +1,13 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        * DerivedSources.make:
+
 2019-04-25  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r244627.
index f413bc0..3e20631 100644 (file)
@@ -33,7 +33,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
index 298d47e..d225ef2 100644 (file)
@@ -1115,35 +1115,35 @@ ifeq ($(USE_LLVM_TARGET_TRIPLES_FOR_CLANG),YES)
     TARGET_TRIPLE_FLAGS=-target $(WK_CURRENT_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(LLVM_TARGET_TRIPLE_OS_VERSION)$(LLVM_TARGET_TRIPLE_SUFFIX)
 endif
 
-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS_FAMILY ' | cut -d' ' -f3), 1)
+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS_FAMILY ' | cut -d' ' -f3), 1)
     WTF_PLATFORM_IOS_FAMILY = 1
 else
     WTF_PLATFORM_IOS_FAMILY = 0
 endif
 
-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_MAC ' | cut -d' ' -f3), 1)
+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_MAC ' | cut -d' ' -f3), 1)
     WTF_PLATFORM_MAC = 1
 else
     WTF_PLATFORM_MAC = 0
 endif
 
-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep USE_APPLE_INTERNAL_SDK | cut -d' ' -f3), 1)
+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep USE_APPLE_INTERNAL_SDK | cut -d' ' -f3), 1)
     USE_APPLE_INTERNAL_SDK = 1
 else
     USE_APPLE_INTERNAL_SDK = 0
 endif
 
-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep HAVE_OS_DARK_MODE_SUPPORT | cut -d' ' -f3), 1)
+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep HAVE_OS_DARK_MODE_SUPPORT | cut -d' ' -f3), 1)
     HAVE_OS_DARK_MODE_SUPPORT = 1
 else
     HAVE_OS_DARK_MODE_SUPPORT = 0
 endif
 
-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ENABLE_ORIENTATION_EVENTS | cut -d' ' -f3), 1)
+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ENABLE_ORIENTATION_EVENTS | cut -d' ' -f3), 1)
     ENABLE_ORIENTATION_EVENTS = 1
 endif
 
-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ENABLE_MEDIA_SOURCE | cut -d' ' -f3), 1)
+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ENABLE_MEDIA_SOURCE | cut -d' ' -f3), 1)
        ENABLE_MEDIA_SOURCE = 1
 endif
 
index 00a1d39..422c8d2 100644 (file)
@@ -1,3 +1,12 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+
 2019-04-25  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r244627.
index b903943..a74380b 100644 (file)
@@ -33,7 +33,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
index 890bc0f..5d3cbcb 100644 (file)
@@ -131,9 +131,9 @@ bool LegacyTileGrid::dropDistantTiles(unsigned tilesNeeded, double shortestDista
             continue;
         toRemove.append(std::make_pair(distance, index));
         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-        std::push_heap(toRemove.begin(), toRemove.end(), std::ptr_fun(isFartherAway<TileIndex>));
+        std::push_heap(toRemove.begin(), toRemove.end(), isFartherAway<TileIndex>);
         if (toRemove.size() > tilesToRemoveCount) {
-            std::pop_heap(toRemove.begin(), toRemove.end(), std::ptr_fun(isFartherAway<TileIndex>));
+            std::pop_heap(toRemove.begin(), toRemove.end(), isFartherAway<TileIndex>);
             toRemove.removeLast();
         }
         ALLOW_DEPRECATED_DECLARATIONS_END
index cd2a80b..93c31c5 100644 (file)
@@ -1,3 +1,12 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+
 2019-04-24  Nikita Vasilyev  <nvasilyev@apple.com>
 
         Web Inspector: Styles: don't start property selection when pressing right mouse button
index b917eab..561c466 100644 (file)
@@ -17,7 +17,7 @@ DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
 ALWAYS_SEARCH_USER_PATHS = NO;
 FRAMEWORK_SEARCH_PATHS = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(inherited);
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
index bfe4309..d492ff8 100644 (file)
@@ -1,3 +1,13 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        * DerivedSources.make:
+
 2019-04-25  Alexander Mikhaylenko  <exalm7659@gmail.com>
 
         [GTK] Back/Forward gesture interferes with scrolling
index f106d27..b1fb5a1 100644 (file)
@@ -31,7 +31,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
index 0330a89..5b6ad82 100644 (file)
@@ -269,7 +269,7 @@ AUTOMATION_PROTOCOL_OUTPUT_FILES = \
 AUTOMATION_PROTOCOL_OUTPUT_PATTERNS = $(subst .,%,$(AUTOMATION_PROTOCOL_OUTPUT_FILES))
 
 ifeq ($(OS),MACOS)
-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS_FAMILY ' | cut -d' ' -f3), 1)
+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS_FAMILY ' | cut -d' ' -f3), 1)
        AUTOMATION_BACKEND_PLATFORM_ARGUMENTS = --platform iOS
 else
        AUTOMATION_BACKEND_PLATFORM_ARGUMENTS = --platform macOS
index 8a30d74..0499545 100644 (file)
@@ -1,3 +1,12 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+
 2019-04-25  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r244627.
index a846def..e88fa63 100644 (file)
@@ -33,7 +33,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
index 3fa44e8..b93b1f1 100644 (file)
@@ -1,3 +1,12 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+
 2019-04-24  Yusuke Suzuki  <ysuzuki@apple.com>
 
         Unreviewed, fix typo in r244481
index 0962766..30e0de4 100644 (file)
@@ -31,7 +31,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_ARC = YES;
 CLANG_ENABLE_OBJC_WEAK = YES;
index 83d1e22..c6aad50 100644 (file)
@@ -26,9 +26,9 @@ if (NOT COMPILER_IS_CLANG_CL)
     add_definitions(-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1)
 endif ()
 
-# Enable C++14
+# Enable C++17
 # https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version
-add_compile_options(/std:c++14)
+add_compile_options(/std:c++17)
 
 # Specify the source code encoding
 add_compile_options(/utf-8 /validate-charset)
index b4300dc..e47c919 100644 (file)
@@ -104,11 +104,11 @@ if (COMPILER_IS_GCC_OR_CLANG)
         WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions)
         WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-fno-rtti)
 
-        check_cxx_compiler_flag("-std=c++14" CXX_COMPILER_SUPPORTS_CXX14)
-        if (CXX_COMPILER_SUPPORTS_CXX14)
-            WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++14)
+        check_cxx_compiler_flag("-std=c++17" CXX_COMPILER_SUPPORTS_CXX17)
+        if (CXX_COMPILER_SUPPORTS_CXX17)
+            WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++17)
         else ()
-            message(FATAL_ERROR "Compiler with C++14 support is required")
+            message(FATAL_ERROR "Compiler with C++17 support is required")
         endif ()
 
         if (WIN32)
index a2e60f5..b5e1c97 100644 (file)
@@ -1,3 +1,16 @@
+2019-04-25  Alex Christensen  <achristensen@webkit.org>
+
+        Start using C++17
+        https://bugs.webkit.org/show_bug.cgi?id=197131
+
+        Reviewed by Darin Adler.
+
+        * DumpRenderTree/mac/Configurations/Base.xcconfig:
+        * MiniBrowser/Configurations/Base.xcconfig:
+        * MobileMiniBrowser/Configurations/Base.xcconfig:
+        * TestWebKitAPI/Configurations/Base.xcconfig:
+        * WebKitTestRunner/Configurations/Base.xcconfig:
+
 2019-04-25  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r244627.
index 9fd4ad0..7fb143e 100644 (file)
@@ -35,7 +35,7 @@ WK_PRIVATE_FRAMEWORK_STUBS_DIR_iphone_ = $(PROJECT_DIR)/../../WebKitLibraries/We
 
 FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(WK_PRIVATE_FRAMEWORK_STUBS_DIR);
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_CXX0X_EXTENSIONS = NO;
index d9fcbcf..057c2ae 100644 (file)
@@ -31,7 +31,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 GCC_PREPROCESSOR_DEFINITIONS = DISABLE_LEGACY_WEBKIT_DEPRECATIONS $(inherited);
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
index edd1359..e623be2 100644 (file)
@@ -31,7 +31,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
 ALWAYS_SEARCH_USER_PATHS = NO;
 CLANG_ANALYZER_NONNULL = YES;
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_MODULES = YES;
 CLANG_ENABLE_OBJC_ARC = YES;
index cf5e374..ed761d5 100644 (file)
@@ -29,7 +29,7 @@ USE_INTERNAL_SDK_Production = YES;
 USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
 USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_CXX0X_EXTENSIONS = NO;
index 56bf9fd..146bcc7 100644 (file)
 
 #import "TCPServer.h"
 #import "Utilities.h"
+#import <WebKit/WKProcessPoolPrivate.h>
 #import <WebKit/WKWebsiteDataStorePrivate.h>
 #import <WebKit/WebKit.h>
+#import <WebKit/_WKProcessPoolConfiguration.h>
 #import <WebKit/_WKWebsiteDataStoreConfiguration.h>
 #import <wtf/RetainPtr.h>
 
@@ -64,16 +66,26 @@ TEST(WebKit, HTTPSProxy)
 
         const char* reply = ""
         "HTTP/1.1 200 OK\r\n"
+        "Strict-Transport-Security: max-age=16070400; includeSubDomains\r\n"
         "Content-Length: 34\r\n\r\n"
         "<script>alert('success!')</script>";
         auto writeResult = SSL_write(ssl, reply, strlen(reply));
         ASSERT_UNUSED(writeResult, writeResult == static_cast<int>(strlen(reply)));
     });
 
+    RetainPtr<NSString> tempDir = NSTemporaryDirectory();
+    WTFLogAlways("ORIGINAL TEMP DIR %@", tempDir.get());
+    if ([tempDir hasSuffix:@"/"])
+        tempDir = [tempDir substringWithRange:NSMakeRange(0, [tempDir length] - 1)];
+    
+    WTFLogAlways("TEMP DIR %@", tempDir.get());
+    auto poolConfiguration = adoptNS([_WKProcessPoolConfiguration new]);
+    [poolConfiguration setHSTSStorageDirectory:tempDir.get()];
     auto storeConfiguration = adoptNS([_WKWebsiteDataStoreConfiguration new]);
     [storeConfiguration setHTTPSProxy:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]];
     auto viewConfiguration = adoptNS([WKWebViewConfiguration new]);
     [viewConfiguration setWebsiteDataStore:[[[WKWebsiteDataStore alloc] _initWithConfiguration:storeConfiguration.get()] autorelease]];
+    [viewConfiguration setProcessPool:[[[WKProcessPool alloc] _initWithConfiguration:poolConfiguration.get()] autorelease]];
     auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 100) configuration:viewConfiguration.get()]);
     auto delegate = adoptNS([ProxyDelegate new]);
     [webView setNavigationDelegate:delegate.get()];
@@ -81,6 +93,13 @@ TEST(WebKit, HTTPSProxy)
 
     [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://example.com/"]]];
     TestWebKitAPI::Util::run(&receivedAlert);
+    
+    RetainPtr<NSString> filePath = [tempDir stringByAppendingPathComponent:@"HSTS.plist"];
+    WTFLogAlways("WAITING FOR FILE TO BE WRITTEN TO %@", filePath.get());
+    while (![[NSFileManager defaultManager] fileExistsAtPath:filePath.get()])
+        TestWebKitAPI::Util::spinRunLoop();
+    [[NSFileManager defaultManager] removeItemAtPath:filePath.get() error:nil];
+    WTFLogAlways("DONE");
 }
 
 } // namespace TestWebKitAPI
index cd017d8..548bbe2 100644 (file)
@@ -29,7 +29,7 @@ USE_INTERNAL_SDK_Production = YES;
 USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
 USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LANGUAGE_STANDARD = gnu++17;
 CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 ENABLE_STRICT_OBJC_MSGSEND = YES;