Diff
Modified: trunk/Source/WebKit/ChangeLog (238075 => 238076)
--- trunk/Source/WebKit/ChangeLog 2018-11-11 17:13:40 UTC (rev 238075)
+++ trunk/Source/WebKit/ChangeLog 2018-11-11 20:00:01 UTC (rev 238076)
@@ -1,3 +1,15 @@
+2018-11-11 Dan Bernstein <[email protected]>
+
+ ProcessPoolConfiguration::copy() doesn’t copy m_customWebContentServiceBundleIdentifier
+ https://bugs.webkit.org/show_bug.cgi?id=191514
+
+ Reviewed by Geoffrey Garen.
+
+ Test: WebKitCocoa/WKProcessPoolConfiguration.mm
+
+ * UIProcess/API/APIProcessPoolConfiguration.cpp:
+ (API::ProcessPoolConfiguration::copy): Copy m_customWebContentServiceBundleIdentifier.
+
2018-11-11 Benjamin Poulain <[email protected]>
Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
Modified: trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp (238075 => 238076)
--- trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp 2018-11-11 17:13:40 UTC (rev 238075)
+++ trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp 2018-11-11 20:00:01 UTC (rev 238076)
@@ -130,6 +130,7 @@
#if PLATFORM(COCOA)
copy->m_suppressesConnectionTerminationOnSystemChange = this->m_suppressesConnectionTerminationOnSystemChange;
#endif
+ copy->m_customWebContentServiceBundleIdentifier = this->m_customWebContentServiceBundleIdentifier;
return copy;
}
Modified: trunk/Tools/ChangeLog (238075 => 238076)
--- trunk/Tools/ChangeLog 2018-11-11 17:13:40 UTC (rev 238075)
+++ trunk/Tools/ChangeLog 2018-11-11 20:00:01 UTC (rev 238076)
@@ -1,3 +1,14 @@
+2018-11-11 Dan Bernstein <[email protected]>
+
+ ProcessPoolConfiguration::copy() doesn’t copy m_customWebContentServiceBundleIdentifier
+ https://bugs.webkit.org/show_bug.cgi?id=191514
+
+ Reviewed by Geoffrey Garen.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKitCocoa/WKProcessPoolConfiguration.mm: Added.
+ (TEST):
+
2018-11-11 Benjamin Poulain <[email protected]>
Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (238075 => 238076)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2018-11-11 17:13:40 UTC (rev 238075)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2018-11-11 20:00:01 UTC (rev 238076)
@@ -141,6 +141,7 @@
375E0E171D66674400EFEC2C /* WKNSNumber.mm in Sources */ = {isa = PBXBuildFile; fileRef = 375E0E151D66674400EFEC2C /* WKNSNumber.mm */; };
3760C4F1211249AF00233ACC /* AttrStyle.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3760C4F0211249AF00233ACC /* AttrStyle.mm */; };
376C8C061D6E197C007D2BB9 /* FrameHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 376C8C041D6E197C007D2BB9 /* FrameHandle.cpp */; };
+ 3781746D2198AE4600062C26 /* WKProcessPoolConfiguration.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3781746C2198AE2400062C26 /* WKProcessPoolConfiguration.mm */; };
378E64771632655E00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 378E64751632655D00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp */; };
378E64791632707400B6C676 /* link-with-title.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 378E647816326FDF00B6C676 /* link-with-title.html */; };
379028B914FAC24C007E6B43 /* acceptsFirstMouse.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 379028B814FABE49007E6B43 /* acceptsFirstMouse.html */; };
@@ -1424,6 +1425,7 @@
3760C4F221124BD000233ACC /* AttrStyle.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = AttrStyle.html; sourceTree = "<group>"; };
376C8C041D6E197C007D2BB9 /* FrameHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameHandle.cpp; sourceTree = "<group>"; };
3776BC62150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceScaleFactorInDashboardRegions.mm; sourceTree = "<group>"; };
+ 3781746C2198AE2400062C26 /* WKProcessPoolConfiguration.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WKProcessPoolConfiguration.mm; sourceTree = "<group>"; };
378E64711632646D00B6C676 /* InjectedBundleFrameHitTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleFrameHitTest.cpp; sourceTree = "<group>"; };
378E64751632655D00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleFrameHitTest_Bundle.cpp; sourceTree = "<group>"; };
378E647816326FDF00B6C676 /* link-with-title.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "link-with-title.html"; sourceTree = "<group>"; };
@@ -2503,6 +2505,7 @@
A14AAB611E78D7DE00C1ADC2 /* WKPDFView.mm */,
2D00065D1C1F58940088E6A7 /* WKPDFViewResizeCrash.mm */,
2D21FE581F04642800B58E7D /* WKPDFViewStablePresentationUpdateCallback.mm */,
+ 3781746C2198AE2400062C26 /* WKProcessPoolConfiguration.mm */,
44817A2E1F0486BF00003810 /* WKRequestActivatedElementInfo.mm */,
5E4B1D2C1D404C6100053621 /* WKScrollViewDelegate.mm */,
51C683DD1EA134DB00650183 /* WKURLSchemeHandler-1.mm */,
@@ -3976,6 +3979,7 @@
5CAE463820193B6A0051610F /* NetworkProcessCrashNonPersistentDataStore.mm in Sources */,
9B19CDA01F06DFE3000548DD /* NetworkProcessCrashWithPendingConnection.mm in Sources */,
7CCE7F021A411AE600447C4C /* NewFirstVisuallyNonEmptyLayout.cpp in Sources */,
+ 3781746D2198AE4600062C26 /* WKProcessPoolConfiguration.mm in Sources */,
7CCE7F031A411AE600447C4C /* NewFirstVisuallyNonEmptyLayoutFails.cpp in Sources */,
7CCE7F041A411AE600447C4C /* NewFirstVisuallyNonEmptyLayoutForImages.cpp in Sources */,
7CCE7F051A411AE600447C4C /* NewFirstVisuallyNonEmptyLayoutFrames.cpp in Sources */,
Added: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKProcessPoolConfiguration.mm (0 => 238076)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKProcessPoolConfiguration.mm (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKProcessPoolConfiguration.mm 2018-11-11 20:00:01 UTC (rev 238076)
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2018 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ */
+
+#import "config.h"
+#import <WebKit/WKFoundation.h>
+
+#if WK_API_ENABLED
+
+#import <WebKit/_WKProcessPoolConfiguration.h>
+#import <wtf/RetainPtr.h>
+
+TEST(WKProcessPoolConfiguration, Copy)
+{
+ auto configuration = adoptNS([[_WKProcessPoolConfiguration alloc] init]);
+
+ [configuration setInjectedBundleURL:[NSURL fileURLWithPath:@"/path/to/injected.wkbundle"]];
+ [configuration setMaximumProcessCount:42];
+ [configuration setCustomWebContentServiceBundleIdentifier:@"org.webkit.WebContent.custom"];
+ [configuration setIgnoreSynchronousMessagingTimeoutsForTesting:YES];
+ [configuration setAttrStyleEnabled:YES];
+ [configuration setAdditionalReadAccessAllowedURLs:@[ [NSURL fileURLWithPath:@"/path/to/allow/read/access/"] ]];
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR)
+ [configuration setWirelessContextIdentifier:25];
+#endif
+ [configuration setDiskCacheSizeOverride:42000];
+ [configuration setCachePartitionedURLSchemes:@[ @"ssh", @"vnc" ]];
+ [configuration setAlwaysRevalidatedURLSchemes:@[ @"afp", @"smb" ]];
+ [configuration setDiskCacheSpeculativeValidationEnabled:YES];
+ [configuration setShouldCaptureAudioInUIProcess:YES];
+#if PLATFORM(IOS_FAMILY)
+ [configuration setCTDataConnectionServiceType:@"best"];
+ [configuration setAlwaysRunsAtBackgroundPriority:YES];
+ [configuration setShouldTakeUIBackgroundAssertion:YES];
+#endif
+ [configuration setPresentingApplicationPID:1000];
+ [configuration setProcessSwapsOnNavigation:YES];
+ [configuration setAlwaysKeepAndReuseSwappedProcesses:YES];
+ [configuration setProcessSwapsOnWindowOpenWithOpener:YES];
+ [configuration setPrewarmsProcessesAutomatically:YES];
+ [configuration setPageCacheEnabled:YES];
+ [configuration setSuppressesConnectionTerminationOnSystemChange:YES];
+
+ auto copy = adoptNS([configuration copy]);
+
+ EXPECT_TRUE([[configuration injectedBundleURL] isEqual:[copy injectedBundleURL]]);
+ EXPECT_EQ([configuration maximumProcessCount], [copy maximumProcessCount]);
+ EXPECT_TRUE([[configuration customWebContentServiceBundleIdentifier] isEqual:[copy customWebContentServiceBundleIdentifier]]);
+ EXPECT_EQ([configuration ignoreSynchronousMessagingTimeoutsForTesting], [copy ignoreSynchronousMessagingTimeoutsForTesting]);
+ EXPECT_EQ([configuration attrStyleEnabled], [copy attrStyleEnabled]);
+ EXPECT_TRUE([[configuration additionalReadAccessAllowedURLs] isEqual:[copy additionalReadAccessAllowedURLs]]);
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR)
+ EXPECT_EQ([configuration wirelessContextIdentifier], [copy wirelessContextIdentifier]);
+#endif
+ EXPECT_EQ([configuration diskCacheSizeOverride], [copy diskCacheSizeOverride]);
+ EXPECT_TRUE([[configuration cachePartitionedURLSchemes] isEqual:[copy cachePartitionedURLSchemes]]);
+ EXPECT_TRUE([[configuration alwaysRevalidatedURLSchemes] isEqual:[copy alwaysRevalidatedURLSchemes]]);
+ EXPECT_EQ([configuration diskCacheSpeculativeValidationEnabled], [copy diskCacheSpeculativeValidationEnabled]);
+ EXPECT_EQ([configuration shouldCaptureAudioInUIProcess], [copy shouldCaptureAudioInUIProcess]);
+#if PLATFORM(IOS_FAMILY)
+ EXPECT_TRUE([[configuration CTDataConnectionServiceType] isEqual:[copy CTDataConnectionServiceType]]);
+ EXPECT_EQ([configuration alwaysRunsAtBackgroundPriority], [copy alwaysRunsAtBackgroundPriority]);
+ EXPECT_EQ([configuration shouldTakeUIBackgroundAssertion], [copy shouldTakeUIBackgroundAssertion]);
+#endif
+ EXPECT_EQ([configuration presentingApplicationPID], [copy presentingApplicationPID]);
+ EXPECT_EQ([configuration processSwapsOnNavigation], [copy processSwapsOnNavigation]);
+ EXPECT_EQ([configuration alwaysKeepAndReuseSwappedProcesses], [copy alwaysKeepAndReuseSwappedProcesses]);
+ EXPECT_EQ([configuration processSwapsOnWindowOpenWithOpener], [copy processSwapsOnWindowOpenWithOpener]);
+ EXPECT_EQ([configuration prewarmsProcessesAutomatically], [copy prewarmsProcessesAutomatically]);
+ EXPECT_EQ([configuration pageCacheEnabled], [copy pageCacheEnabled]);
+ EXPECT_EQ([configuration suppressesConnectionTerminationOnSystemChange], [copy suppressesConnectionTerminationOnSystemChange]);
+}
+
+#endif