Diff
Modified: branches/safari-609-branch/Source/WebKit/ChangeLog (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/ChangeLog 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/ChangeLog 2020-06-04 19:00:25 UTC (rev 262549)
@@ -1,3 +1,7 @@
+2020-06-04 Alan Coon <alanc...@apple.com>
+
+ Revert r258924. rdar://problem/63902456
+
2020-05-19 Russell Epstein <repst...@apple.com>
Apply patch. rdar://problem/63156096
Modified: branches/safari-609-branch/Source/WebKit/Configurations/WebKit.xcconfig (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/Configurations/WebKit.xcconfig 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/Configurations/WebKit.xcconfig 2020-06-04 19:00:25 UTC (rev 262549)
@@ -51,9 +51,6 @@
WK_ASSERTION_SERVICES_LDFLAGS = $(WK_ASSERTION_SERVICES_LDFLAGS_$(WK_COCOA_TOUCH));
WK_ASSERTION_SERVICES_LDFLAGS_cocoatouch = -framework AssertionServices;
-WK_RUNNINGBOARD_SERVICES_LDFLAGS = $(WK_RUNNINGBOARD_SERVICES_LDFLAGS_$(WK_COCOA_TOUCH));
-WK_RUNNINGBOARD_SERVICES_LDFLAGS_cocoatouch = -framework RunningBoardServices;
-
WK_CARBON_LDFLAGS = $(WK_CARBON_LDFLAGS_$(WK_PLATFORM_NAME));
WK_CARBON_LDFLAGS_macosx = -framework Carbon;
@@ -130,7 +127,7 @@
WK_AUTHKIT_LDFLAGS_macosx = $(WK_AUTHKIT_LDFLAGS$(WK_MACOS_1015));
WK_AUTHKIT_LDFLAGS_MACOS_SINCE_1015 = -framework AuthKit;
-FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework IOSurface -framework WebKitLegacy -lnetwork $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_ASSERTION_SERVICES_LDFLAGS) $(WK_RUNNINGBOARD_SERVICES_LDFLAGS) $(WK_AUTHKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_DEVICE_IDENTITY_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS);
+FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework IOSurface -framework WebKitLegacy -lnetwork $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_ASSERTION_SERVICES_LDFLAGS) $(WK_AUTHKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_DEVICE_IDENTITY_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS);
// Prevent C++ standard library basic_stringstream, operator new, delete and their related exception types from being exported as weak symbols.
UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-unexported_symbol -Wl,__Znwm -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2EOS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1EOS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSEDn -Wl,-unexported_symbol -Wl,__ZNKSt3__18functionIFvN7WebCore12PolicyActionEEEclES2_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEE4swapERS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1ERKS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2ERKS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEE
ED1Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED2Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSERKS4_ -Wl,-unexported_symbol -Wl,__ZTVNSt3__117bad_function_callE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_14basic_iostreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE16_NS_13basic_ostreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTTNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTVNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTVNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEE
NS_9allocatorIcEEEE8_NS_13basic_ostreamIcS2_EE;
Deleted: branches/safari-609-branch/Source/WebKit/Platform/spi/ios/RunningBoardServicesSPI.h (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/Platform/spi/ios/RunningBoardServicesSPI.h 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/Platform/spi/ios/RunningBoardServicesSPI.h 2020-06-04 19:00:25 UTC (rev 262549)
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2020 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.
- */
-
-#import <Foundation/Foundation.h>
-
-#if USE(APPLE_INTERNAL_SDK)
-
-#import <RunningBoardServices/RunningBoardServices.h>
-
-#else
-
-@interface RBSAttribute : NSObject
-@end
-
-@interface RBSDomainAttribute : RBSAttribute
-+ (instancetype)attributeWithDomain:(NSString *)domain name:(NSString *)name;
-@end
-
-@interface RBSTarget : NSObject
-+ (RBSTarget *)targetWithPid:(pid_t)pid;
-@end
-
-@interface RBSAssertion : NSObject
-- (instancetype)initWithExplanation:(NSString *)explanation target:(RBSTarget *)target attributes:(NSArray <RBSAttribute *> *)attributes;
-- (BOOL)acquireWithError:(NSError **)error;
-- (void)invalidate;
-@end
-
-#endif
Modified: branches/safari-609-branch/Source/WebKit/Scripts/process-entitlements.sh (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/Scripts/process-entitlements.sh 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/Scripts/process-entitlements.sh 2020-06-04 19:00:25 UTC (rev 262549)
@@ -111,7 +111,6 @@
plistbuddy Add :com.apple.private.network.socket-delegate bool YES
plistbuddy Add :com.apple.private.webinspector.allow-remote-inspection bool YES
plistbuddy Add :com.apple.private.webinspector.proxy-application bool YES
- plistbuddy Add :com.apple.runningboard.assertions.webkit bool YES
plistbuddy Add :dynamic-codesigning bool YES
plistbuddy Add :com.apple.tcc.delegated-services array
Deleted: branches/safari-609-branch/Source/WebKit/Shared/DependencyProcessAssertion.cpp (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/Shared/DependencyProcessAssertion.cpp 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/Shared/DependencyProcessAssertion.cpp 2020-06-04 19:00:25 UTC (rev 262549)
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2020 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.
- */
-
-#include "config.h"
-#include "DependencyProcessAssertion.h"
-
-#if !PLATFORM(IOS_FAMILY)
-
-namespace WebKit {
-
-DependencyProcessAssertion::DependencyProcessAssertion(ProcessID, ASCIILiteral description)
-{
- UNUSED_PARAM(description);
-}
-
-DependencyProcessAssertion::~DependencyProcessAssertion()
-{
-}
-
-} // namespace WebKit
-
-#endif
Deleted: branches/safari-609-branch/Source/WebKit/Shared/DependencyProcessAssertion.h (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/Shared/DependencyProcessAssertion.h 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/Shared/DependencyProcessAssertion.h 2020-06-04 19:00:25 UTC (rev 262549)
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2020 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.
- */
-
-#pragma once
-
-#include <wtf/ProcessID.h>
-#include <wtf/RetainPtr.h>
-#include <wtf/text/ASCIILiteral.h>
-
-#if PLATFORM(IOS_FAMILY)
-OBJC_CLASS RBSAssertion;
-#endif
-
-namespace WebKit {
-
-class DependencyProcessAssertion {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- DependencyProcessAssertion(ProcessID targetPID, ASCIILiteral description);
- ~DependencyProcessAssertion();
-
-private:
-#if PLATFORM(IOS_FAMILY)
- RetainPtr<RBSAssertion> m_assertion;
-#endif
-};
-
-} // namespace WebKit
Modified: branches/safari-609-branch/Source/WebKit/Shared/NativeWebTouchEvent.h (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/Shared/NativeWebTouchEvent.h 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/Shared/NativeWebTouchEvent.h 2020-06-04 19:00:25 UTC (rev 262549)
@@ -27,14 +27,11 @@
#include "WebEvent.h"
-#if PLATFORM(IOS_FAMILY) && defined(__OBJC__)
-#include <UIKit/UIKit.h>
-#endif
-
#if ENABLE(TOUCH_EVENTS)
#if PLATFORM(IOS_FAMILY)
#if defined(__OBJC__)
+#include <UIKit/UIKit.h>
struct _UIWebTouchEvent;
#endif
#elif PLATFORM(GTK)
Deleted: branches/safari-609-branch/Source/WebKit/Shared/ios/DependencyProcessAssertionIOS.mm (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/Shared/ios/DependencyProcessAssertionIOS.mm 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/Shared/ios/DependencyProcessAssertionIOS.mm 2020-06-04 19:00:25 UTC (rev 262549)
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2020 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 "DependencyProcessAssertion.h"
-
-#if PLATFORM(IOS_FAMILY)
-
-#import "RunningBoardServicesSPI.h"
-
-namespace WebKit {
-
-DependencyProcessAssertion::DependencyProcessAssertion(ProcessID targetPID, ASCIILiteral description)
-{
- RBSTarget *target = [RBSTarget targetWithPid:targetPID];
- RBSDomainAttribute *domainAttribute = [RBSDomainAttribute attributeWithDomain:@"com.apple.webkit" name:@"DependentProcessLink"];
- m_assertion = adoptNS([[RBSAssertion alloc] initWithExplanation:String { description } target:target attributes:@[domainAttribute]]);
- NSError *acquisitionError = nil;
- if (![m_assertion acquireWithError:&acquisitionError])
- RELEASE_LOG_ERROR(Process, "DependencyProcessAssertion::DependencyProcessAssertion: Failed to acquire dependency process assertion '%{public}s', error: %{public}@", description.characters(), acquisitionError);
- else
- RELEASE_LOG(Process, "DependencyProcessAssertion::DependencyProcessAssertion: Successfully took a dependency process assertion '%{public}s' for target process with PID %d", description.characters(), targetPID);
-}
-
-DependencyProcessAssertion::~DependencyProcessAssertion()
-{
- [m_assertion invalidate];
-}
-
-} // namespace WebKit
-
-#endif // PLATFORM(IOS_FAMILY)
Modified: branches/safari-609-branch/Source/WebKit/Sources.txt (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/Sources.txt 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/Sources.txt 2020-06-04 19:00:25 UTC (rev 262549)
@@ -134,7 +134,6 @@
Shared/CacheModel.cpp
Shared/ContextMenuContextData.cpp
Shared/DebuggableInfoData.cpp
-Shared/DependencyProcessAssertion.cpp
Shared/EditingRange.cpp
Shared/EditorState.cpp
Shared/FontInfo.cpp
Modified: branches/safari-609-branch/Source/WebKit/SourcesCocoa.txt (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/SourcesCocoa.txt 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/SourcesCocoa.txt 2020-06-04 19:00:25 UTC (rev 262549)
@@ -173,7 +173,6 @@
Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm
Shared/ios/AuxiliaryProcessIOS.mm
-Shared/ios/DependencyProcessAssertionIOS.mm
Shared/ios/InteractionInformationAtPosition.mm
Shared/ios/InteractionInformationRequest.cpp
Shared/ios/NativeWebKeyboardEventIOS.mm
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm 2020-06-04 19:00:25 UTC (rev 262549)
@@ -190,4 +190,24 @@
}
#endif
+#if PLATFORM(IOS_FAMILY)
+void WebProcessProxy::processWasResumed(CompletionHandler<void()>&& completionHandler)
+{
+ CompletionHandlerCallingScope exitScope(WTFMove(completionHandler));
+
+ if (m_throttler.shouldBeRunnable()) {
+ // The process becoming unsuspended was not unexpected.
+ return;
+ }
+
+ // The WebProcess was awakened by something other than the UIProcess. Take out an assertion for a
+ // limited duration to allow whatever task needs to be accomplished time to complete.
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcessProxy::processWasResumed() Process was unexpectedly resumed, starting background activity", this);
+ auto backgroundActivityTimeoutHandler = [activity = m_throttler.backgroundActivity("WebProcess was unexpectedly resumed"_s), weakThis = makeWeakPtr(this)] {
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcessProxy::processWasResumed() - lambda, background activity timed out", weakThis.get());
+ };
+ m_unexpectedActivityTimer = makeUnique<WebCore::DeferrableOneShotTimer>(WTFMove(backgroundActivityTimeoutHandler), unexpectedActivityDuration);
}
+#endif
+
+}
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/WebProcessProxy.h (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/UIProcess/WebProcessProxy.h 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/WebProcessProxy.h 2020-06-04 19:00:25 UTC (rev 262549)
@@ -326,6 +326,10 @@
void unblockAccessibilityServerIfNeeded();
#endif
+#if PLATFORM(IOS_FAMILY)
+ void processWasResumed(CompletionHandler<void()>&&);
+#endif
+
void webPageMediaStateDidChange(WebPageProxy&);
void ref() final { ThreadSafeRefCounted::ref(); }
@@ -497,6 +501,10 @@
std::unique_ptr<ProcessThrottler::BackgroundActivity> m_activityForHoldingLockedFiles;
ForegroundWebProcessToken m_foregroundToken;
BackgroundWebProcessToken m_backgroundToken;
+#if PLATFORM(IOS_FAMILY)
+ bool m_hasSentMessageToUnblockAccessibilityServer { false };
+ std::unique_ptr<WebCore::DeferrableOneShotTimer> m_unexpectedActivityTimer;
+#endif
#if PLATFORM(IOS_FAMILY)
bool m_hasSentMessageToUnblockAccessibilityServer { false };
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/WebProcessProxy.messages.in (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/UIProcess/WebProcessProxy.messages.in 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/WebProcessProxy.messages.in 2020-06-04 19:00:25 UTC (rev 262549)
@@ -72,6 +72,10 @@
StopDisplayLink(unsigned observerID, uint32_t displayID)
#endif
+#if PLATFORM(IOS_FAMILY)
+ ProcessWasResumed() -> () Async
+#endif
+
# Plug-in messages.
void AddPlugInAutoStartOriginHash(String pageOrigin, uint32_t hash)
void PlugInDidReceiveUserInteraction(uint32_t hash)
Modified: branches/safari-609-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-06-04 19:00:25 UTC (rev 262549)
@@ -956,7 +956,6 @@
46BEB6E322FBB21A00269867 /* TransientLocalStorageNamespace.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BEB6E122FBB21A00269867 /* TransientLocalStorageNamespace.h */; };
46C392292316EC4D008EED9B /* WebPageProxyIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C392282316EC4D008EED9B /* WebPageProxyIdentifier.h */; };
46DF063C1F3905F8001980BB /* NetworkCORSPreflightChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DF063A1F3905E5001980BB /* NetworkCORSPreflightChecker.h */; };
- 46F38E8C2416E6730059375A /* RunningBoardServicesSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F38E8B2416E66D0059375A /* RunningBoardServicesSPI.h */; };
46F9B26323526EF3006FE5FA /* WebBackForwardCacheEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B26223526ED0006FE5FA /* WebBackForwardCacheEntry.h */; };
49BCA19223A177660028A836 /* APIResourceLoadStatisticsFirstParty.h in Headers */ = {isa = PBXBuildFile; fileRef = 49BCA19123A177660028A836 /* APIResourceLoadStatisticsFirstParty.h */; };
49BCA19523A18CFD0028A836 /* _WKResourceLoadStatisticsFirstPartyInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 49BCA19023A175490028A836 /* _WKResourceLoadStatisticsFirstPartyInternal.h */; };
@@ -3425,10 +3424,6 @@
46C392282316EC4D008EED9B /* WebPageProxyIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebPageProxyIdentifier.h; sourceTree = "<group>"; };
46DF06391F3905E5001980BB /* NetworkCORSPreflightChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkCORSPreflightChecker.cpp; sourceTree = "<group>"; };
46DF063A1F3905E5001980BB /* NetworkCORSPreflightChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkCORSPreflightChecker.h; sourceTree = "<group>"; };
- 46F38E882416D9630059375A /* DependencyProcessAssertion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DependencyProcessAssertion.cpp; sourceTree = "<group>"; };
- 46F38E892416D9630059375A /* DependencyProcessAssertion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DependencyProcessAssertion.h; sourceTree = "<group>"; };
- 46F38E8A2416D9A70059375A /* DependencyProcessAssertionIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DependencyProcessAssertionIOS.mm; path = ios/DependencyProcessAssertionIOS.mm; sourceTree = "<group>"; };
- 46F38E8B2416E66D0059375A /* RunningBoardServicesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunningBoardServicesSPI.h; sourceTree = "<group>"; };
46F9B26223526ED0006FE5FA /* WebBackForwardCacheEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebBackForwardCacheEntry.h; sourceTree = "<group>"; };
49BCA19023A175490028A836 /* _WKResourceLoadStatisticsFirstPartyInternal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = _WKResourceLoadStatisticsFirstPartyInternal.h; sourceTree = "<group>"; };
49BCA19123A177660028A836 /* APIResourceLoadStatisticsFirstParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APIResourceLoadStatisticsFirstParty.h; sourceTree = "<group>"; };
@@ -5577,8 +5572,6 @@
99F642D21FABE378009621E9 /* CoordinateSystem.h */,
99036AE823A970870000B06A /* DebuggableInfoData.cpp */,
99036AE723A970870000B06A /* DebuggableInfoData.h */,
- 46F38E882416D9630059375A /* DependencyProcessAssertion.cpp */,
- 46F38E892416D9630059375A /* DependencyProcessAssertion.h */,
2D7FD190223C730F007887F1 /* DocumentEditingContext.h */,
2D7FD191223C7310007887F1 /* DocumentEditingContext.mm */,
C517388012DF8F4F00EE3F47 /* DragControllerAction.h */,
@@ -6464,7 +6457,6 @@
isa = PBXGroup;
children = (
A7E93CEB192531AA00A1DC48 /* AuxiliaryProcessIOS.mm */,
- 46F38E8A2416D9A70059375A /* DependencyProcessAssertionIOS.mm */,
2DA6731920C754B1003CB401 /* DynamicViewportSizeUpdate.h */,
2DA9449D1884E4F000ED86DB /* GestureTypes.h */,
C5BCE5DA1C50761D00CDE3FA /* InteractionInformationAtPosition.h */,
@@ -9618,7 +9610,6 @@
A13B3DA1207F39DE0090C58D /* MobileWiFiSPI.h */,
3178AF9720E2A7F80074DE94 /* PDFKitSPI.h */,
2DC18FAF218912640025A88D /* PencilKitSPI.h */,
- 46F38E8B2416E66D0059375A /* RunningBoardServicesSPI.h */,
CE1A0BD01A48E6C60054EF74 /* TCCSPI.h */,
CE1A0BD11A48E6C60054EF74 /* TextInputSPI.h */,
CEE4AE2A1A5DCF430002F49B /* UIKitSPI.h */,
@@ -10283,7 +10274,6 @@
7AFBD36A21E542F1005DBACB /* ResourceLoadStatisticsPersistentStorage.h in Headers */,
1A30066E1110F4F70031937C /* ResponsivenessTimer.h in Headers */,
410482CE1DDD324F00F006D0 /* RTCNetwork.h in Headers */,
- 46F38E8C2416E6730059375A /* RunningBoardServicesSPI.h in Headers */,
0E97D74D200E900400BF6643 /* SafeBrowsingSPI.h in Headers */,
5CA9854A210BEB640057EB6B /* SafeBrowsingWarning.h in Headers */,
BC2D021712AC41CB00E732A3 /* SameDocumentNavigationType.h in Headers */,
Modified: branches/safari-609-branch/Source/WebKit/WebProcess/WebProcess.cpp (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/WebProcess/WebProcess.cpp 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/WebProcess.cpp 2020-06-04 19:00:25 UTC (rev 262549)
@@ -31,7 +31,6 @@
#include "APIPageHandle.h"
#include "AuthenticationManager.h"
#include "AuxiliaryProcessMessages.h"
-#include "DependencyProcessAssertion.h"
#include "DrawingArea.h"
#include "EventDispatcher.h"
#include "InjectedBundle.h"
@@ -174,7 +173,6 @@
#define RELEASE_LOG_SESSION_ID (m_sessionID ? m_sessionID->toUInt64() : 0)
#define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [sessionID=%" PRIu64 "] WebProcess::" fmt, this, RELEASE_LOG_SESSION_ID, ##__VA_ARGS__)
-#define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [sessionID=%" PRIu64 "] WebProcess::" fmt, this, RELEASE_LOG_SESSION_ID, ##__VA_ARGS__)
// This should be less than plugInAutoStartExpirationTimeThreshold in PlugInAutoStartProvider.
static const Seconds plugInAutoStartExpirationTimeUpdateThreshold { 29 * 24 * 60 * 60 };
@@ -275,14 +273,7 @@
m_eventDispatcher->initializeConnection(connection);
#if PLATFORM(IOS_FAMILY)
m_viewUpdateDispatcher->initializeConnection(connection);
-
- ASSERT(!m_uiProcessDependencyProcessAssertion);
- if (auto remoteProcessID = connection->remoteProcessID())
- m_uiProcessDependencyProcessAssertion = makeUnique<DependencyProcessAssertion>(remoteProcessID, "WebContent process dependency on UIProcess"_s);
- else
- RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSuspension, "Unable to create a process depending assertion on UIProcess because remoteProcessID is 0");
#endif // PLATFORM(IOS_FAMILY)
-
m_webInspectorInterruptDispatcher->initializeConnection(connection);
#if ENABLE(NETSCAPE_PLUGIN_API)
@@ -293,6 +284,12 @@
supplement->initializeConnection(connection);
m_webConnection = WebConnectionToUIProcess::create(this);
+
+#if PLATFORM(IOS_FAMILY)
+ // Make sure we have an IPC::Connection before creating the ProcessTaskStateObserver since it may call
+ // WebProcess::processTaskStateDidChange() on a background thread and deference the IPC connection.
+ m_taskStateObserver = ProcessTaskStateObserver::create(*this);
+#endif
}
void WebProcess::initializeWebProcess(WebProcessCreationParameters&& parameters, CompletionHandler<void()>&& completionHandler)
@@ -1973,4 +1970,3 @@
#undef RELEASE_LOG_SESSION_ID
#undef RELEASE_LOG_IF_ALLOWED
-#undef RELEASE_LOG_ERROR_IF_ALLOWED
Modified: branches/safari-609-branch/Source/WebKit/WebProcess/WebProcess.h (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/WebProcess/WebProcess.h 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/WebProcess.h 2020-06-04 19:00:25 UTC (rev 262549)
@@ -65,6 +65,11 @@
#include <wtf/MachSendRight.h>
#endif
+#if PLATFORM(IOS_FAMILY)
+#include "ProcessTaskStateObserver.h"
+OBJC_CLASS BKSProcessAssertion;
+#endif
+
#if PLATFORM(WAYLAND) && USE(WPE_RENDERER)
#include <WebCore/PlatformDisplayLibWPE.h>
#endif
@@ -100,7 +105,6 @@
namespace WebKit {
-class DependencyProcessAssertion;
class EventDispatcher;
class GamepadData;
class GPUProcessConnection;
@@ -136,7 +140,11 @@
class LayerHostingContext;
#endif
-class WebProcess : public AuxiliaryProcess
+class WebProcess
+ : public AuxiliaryProcess
+#if PLATFORM(IOS_FAMILY)
+ , ProcessTaskStateObserver::Client
+#endif
{
WTF_MAKE_FAST_ALLOCATED;
public:
@@ -470,8 +478,11 @@
#endif
#if PLATFORM(IOS_FAMILY)
+ void processTaskStateDidChange(ProcessTaskStateObserver::TaskState) final;
bool shouldFreezeOnSuspension() const;
void updateFreezerStatus();
+
+ void releaseProcessWasResumedAssertions();
#endif
#if ENABLE(VIDEO)
@@ -558,7 +569,10 @@
#if PLATFORM(IOS_FAMILY)
WebSQLiteDatabaseTracker m_webSQLiteDatabaseTracker;
- std::unique_ptr<DependencyProcessAssertion> m_uiProcessDependencyProcessAssertion;
+ RefPtr<ProcessTaskStateObserver> m_taskStateObserver;
+ Lock m_processWasResumedAssertionsLock;
+ RetainPtr<BKSProcessAssertion> m_processWasResumedUIAssertion;
+ RetainPtr<BKSProcessAssertion> m_processWasResumedOwnAssertion;
#endif
enum PageMarkingLayersAsVolatileCounterType { };
Modified: branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (262548 => 262549)
--- branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-06-04 19:00:25 UTC (rev 262549)
@@ -93,7 +93,6 @@
#if PLATFORM(IOS_FAMILY)
#import "AccessibilitySupportSPI.h"
#import "AssertionServicesSPI.h"
-#import "RunningBoardServicesSPI.h"
#import "UserInterfaceIdiom.h"
#import "WKAccessibilityWebPageObjectIOS.h"
#import <UIKit/UIAccessibility.h>
@@ -330,6 +329,61 @@
}
#if PLATFORM(IOS_FAMILY)
+void WebProcess::processTaskStateDidChange(ProcessTaskStateObserver::TaskState taskState)
+{
+ // NOTE: This will be called from a background thread.
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::processTaskStateDidChange() - taskState(%d)", this, taskState);
+ if (taskState != ProcessTaskStateObserver::Running)
+ return;
+
+ LockHolder holder(m_processWasResumedAssertionsLock);
+ if (m_processWasResumedUIAssertion && m_processWasResumedOwnAssertion)
+ return;
+
+ // We were awakened from suspension unexpectedly. Notify the WebProcessProxy, but take a process assertion on our parent PID
+ // to ensure that it too is awakened.
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::processTaskStateChanged() Taking 'WebProcess was resumed' assertion on behalf on UIProcess", this);
+ m_processWasResumedUIAssertion = adoptNS([[BKSProcessAssertion alloc] initWithPID:parentProcessConnection()->remoteProcessID() flags:BKSProcessAssertionPreventTaskSuspend reason:BKSProcessAssertionReasonFinishTask name:@"WebProcess was resumed" withHandler:^(BOOL acquired) {
+ if (!acquired)
+ RELEASE_LOG_ERROR(ProcessSuspension, "%p - WebProcess::processTaskStateDidChange() failed to take 'WebProcess was resumed' assertion for parent process", this);
+ }]);
+ m_processWasResumedUIAssertion.get().invalidationHandler = [this] {
+ RELEASE_LOG_ERROR(ProcessSuspension, "%p - WebProcess::processTaskStateChanged() Releasing 'WebProcess was resumed' assertion on behalf on UIProcess due to invalidation", this);
+ releaseProcessWasResumedAssertions();
+ };
+ m_processWasResumedOwnAssertion = adoptNS([[BKSProcessAssertion alloc] initWithPID:getpid() flags:BKSProcessAssertionPreventTaskSuspend reason:BKSProcessAssertionReasonFinishTask name:@"WebProcess was resumed" withHandler:^(BOOL acquired) {
+ if (!acquired)
+ RELEASE_LOG_ERROR(ProcessSuspension, "%p - WebProcess::processTaskStateDidChange() failed to take 'WebProcess was resumed' assertion for WebContent process", this);
+ }]);
+ m_processWasResumedOwnAssertion.get().invalidationHandler = [this] {
+ RELEASE_LOG_ERROR(ProcessSuspension, "%p - WebProcess::processTaskStateChanged() Releasing 'WebProcess was resumed' assertion on behalf on WebContent process due to invalidation", this);
+ releaseProcessWasResumedAssertions();
+ };
+
+ parentProcessConnection()->sendWithAsyncReply(Messages::WebProcessProxy::ProcessWasResumed(), [this] {
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::processTaskStateDidChange() Parent process handled ProcessWasResumed IPC, releasing our assertions", this);
+ releaseProcessWasResumedAssertions();
+ });
+}
+
+void WebProcess::releaseProcessWasResumedAssertions()
+{
+ LockHolder holder(m_processWasResumedAssertionsLock);
+ if (m_processWasResumedUIAssertion) {
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::releaseProcessWasResumedAssertions() Releasing parent process 'WebProcess was resumed' assertion", this);
+ [m_processWasResumedUIAssertion invalidate];
+ m_processWasResumedUIAssertion = nullptr;
+ }
+ if (m_processWasResumedOwnAssertion) {
+ RELEASE_LOG(ProcessSuspension, "%p - WebProcess::releaseProcessWasResumedAssertions() Releasing WebContent process 'WebProcess was resumed' assertion", this);
+ [m_processWasResumedOwnAssertion invalidate];
+ m_processWasResumedOwnAssertion = nullptr;
+ }
+}
+
+#endif
+
+#if PLATFORM(IOS_FAMILY)
static NSString *webProcessLoaderAccessibilityBundlePath()
{
NSString *accessibilityBundlesPath = nil;
Deleted: branches/safari-609-branch/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/13/RunningBoardServices.framework/RunningBoardServices.tbd (262548 => 262549)
--- branches/safari-609-branch/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/13/RunningBoardServices.framework/RunningBoardServices.tbd 2020-06-04 18:28:17 UTC (rev 262548)
+++ branches/safari-609-branch/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/13/RunningBoardServices.framework/RunningBoardServices.tbd 2020-06-04 19:00:25 UTC (rev 262549)
@@ -1,9 +0,0 @@
---- !tapi-tbd-v3
-archs: [ x86_64, arm64, arm64e ]
-install-name: '/System/Library/PrivateFrameworks/RunningBoardServices.framework/RunningBoardServices'
-objc-constraint: none
-platform: ios
-exports:
- - archs: [ x86_64, arm64, arm64e ]
- objc-classes: [ RBSAttribute, RBSDomainAttribute, RBSTarget, RBSAssertion ]
-...