Title: [259674] trunk/Source
Revision
259674
Author
[email protected]
Date
2020-04-07 15:09:36 -0700 (Tue, 07 Apr 2020)

Log Message

Merge DependencyAssertion into ProcessAssertion
https://bugs.webkit.org/show_bug.cgi?id=210076

Reviewed by Alex Christensen.

Source/WebKit:

Merge DependencyAssertion into ProcessAssertion. After r259610, ProcessAssertion can use
RunningBoard assertions so there is no longer any need to a separate DependencyAssertion
class. We can simply introduce a new assertion type to ProcessAssertion.

* Shared/DependencyProcessAssertion.cpp: Removed.
* Shared/DependencyProcessAssertion.h: Removed.
* Shared/ios/DependencyProcessAssertionIOS.mm: Removed.
* Sources.txt:
* SourcesCocoa.txt:
* UIProcess/ProcessAssertion.h:
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager _hasBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]):
(WebKit::runningBoardNameForAssertionType):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
* WebProcess/WebProcess.h:

Source/WTF:

* wtf/PlatformHave.h:

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (259673 => 259674)


--- trunk/Source/WTF/ChangeLog	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WTF/ChangeLog	2020-04-07 22:09:36 UTC (rev 259674)
@@ -1,3 +1,12 @@
+2020-04-07  Chris Dumez  <[email protected]>
+
+        Merge DependencyAssertion into ProcessAssertion
+        https://bugs.webkit.org/show_bug.cgi?id=210076
+
+        Reviewed by Alex Christensen.
+
+        * wtf/PlatformHave.h:
+
 2020-04-07  Saam Barati  <[email protected]>
 
         RAMification should have a way of gathering vmmaps for each test at the end of each run

Modified: trunk/Source/WTF/wtf/PlatformHave.h (259673 => 259674)


--- trunk/Source/WTF/wtf/PlatformHave.h	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2020-04-07 22:09:36 UTC (rev 259674)
@@ -459,7 +459,7 @@
 #if (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
     || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
     || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
-#define HAVE_RUNNINGBOARD_WEBKIT_ASSERTIONS 1
+#define HAVE_RUNNINGBOARD_VISIBILITY_ASSERTIONS 1
 #endif
 
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500

Modified: trunk/Source/WebKit/ChangeLog (259673 => 259674)


--- trunk/Source/WebKit/ChangeLog	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/ChangeLog	2020-04-07 22:09:36 UTC (rev 259674)
@@ -1,3 +1,31 @@
+2020-04-07  Chris Dumez  <[email protected]>
+
+        Merge DependencyAssertion into ProcessAssertion
+        https://bugs.webkit.org/show_bug.cgi?id=210076
+
+        Reviewed by Alex Christensen.
+
+        Merge DependencyAssertion into ProcessAssertion. After r259610, ProcessAssertion can use
+        RunningBoard assertions so there is no longer any need to a separate DependencyAssertion
+        class. We can simply introduce a new assertion type to ProcessAssertion.
+
+        * Shared/DependencyProcessAssertion.cpp: Removed.
+        * Shared/DependencyProcessAssertion.h: Removed.
+        * Shared/ios/DependencyProcessAssertionIOS.mm: Removed.
+        * Sources.txt:
+        * SourcesCocoa.txt:
+        * UIProcess/ProcessAssertion.h:
+        * UIProcess/ios/ProcessAssertionIOS.mm:
+        (-[WKProcessAssertionBackgroundTaskManager init]):
+        (-[WKProcessAssertionBackgroundTaskManager _hasBackgroundTask]):
+        (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
+        (-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]):
+        (WebKit::runningBoardNameForAssertionType):
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::initializeConnection):
+        * WebProcess/WebProcess.h:
+
 2020-04-07  Alex Christensen  <[email protected]>
 
         Simplify and fortify network getNetworkProcessConnection and getGPUProcessConnection

Deleted: trunk/Source/WebKit/Shared/DependencyProcessAssertion.cpp (259673 => 259674)


--- trunk/Source/WebKit/Shared/DependencyProcessAssertion.cpp	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/Shared/DependencyProcessAssertion.cpp	2020-04-07 22:09:36 UTC (rev 259674)
@@ -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: trunk/Source/WebKit/Shared/DependencyProcessAssertion.h (259673 => 259674)


--- trunk/Source/WebKit/Shared/DependencyProcessAssertion.h	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/Shared/DependencyProcessAssertion.h	2020-04-07 22:09:36 UTC (rev 259674)
@@ -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

Deleted: trunk/Source/WebKit/Shared/ios/DependencyProcessAssertionIOS.mm (259673 => 259674)


--- trunk/Source/WebKit/Shared/ios/DependencyProcessAssertionIOS.mm	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/Shared/ios/DependencyProcessAssertionIOS.mm	2020-04-07 22:09:36 UTC (rev 259674)
@@ -1,56 +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"];
-
-    NSString *nsDescription = [NSString stringWithCString:description.characters() encoding:NSASCIIStringEncoding];
-    m_assertion = adoptNS([[RBSAssertion alloc] initWithExplanation:nsDescription 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: trunk/Source/WebKit/Sources.txt (259673 => 259674)


--- trunk/Source/WebKit/Sources.txt	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/Sources.txt	2020-04-07 22:09:36 UTC (rev 259674)
@@ -156,7 +156,6 @@
 Shared/CacheModel.cpp
 Shared/ContextMenuContextData.cpp
 Shared/DebuggableInfoData.cpp
-Shared/DependencyProcessAssertion.cpp
 Shared/EditingRange.cpp
 Shared/EditorState.cpp
 Shared/FontInfo.cpp

Modified: trunk/Source/WebKit/SourcesCocoa.txt (259673 => 259674)


--- trunk/Source/WebKit/SourcesCocoa.txt	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/SourcesCocoa.txt	2020-04-07 22:09:36 UTC (rev 259674)
@@ -174,7 +174,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: trunk/Source/WebKit/UIProcess/ProcessAssertion.h (259673 => 259674)


--- trunk/Source/WebKit/UIProcess/ProcessAssertion.h	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/UIProcess/ProcessAssertion.h	2020-04-07 22:09:36 UTC (rev 259674)
@@ -50,6 +50,7 @@
     UnboundedNetworking,
     Foreground,
     MediaPlayback,
+    DependentProcessLink,
 };
 
 class ProcessAssertion : public CanMakeWeakPtr<ProcessAssertion> {

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (259673 => 259674)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2020-04-07 22:09:36 UTC (rev 259674)
@@ -1367,6 +1367,7 @@
     
     case ProcessAssertionType::MediaPlayback:
     case ProcessAssertionType::UnboundedNetworking:
+    case ProcessAssertionType::DependentProcessLink:
         ASSERT_NOT_REACHED();
     }
 

Modified: trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm (259673 => 259674)


--- trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm	2020-04-07 22:09:36 UTC (rev 259674)
@@ -46,7 +46,7 @@
 static const Seconds releaseBackgroundTaskAfterExpirationDelay { 2_s };
 
 @interface WKProcessAssertionBackgroundTaskManager
-#if HAVE(RUNNINGBOARD_WEBKIT_ASSERTIONS)
+#if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS)
     : NSObject <RBSAssertionObserving>
 #else
     : NSObject
@@ -61,7 +61,7 @@
 
 @implementation WKProcessAssertionBackgroundTaskManager
 {
-#if HAVE(RUNNINGBOARD_WEBKIT_ASSERTIONS)
+#if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS)
     RetainPtr<RBSAssertion> _backgroundTask;
 #else
     UIBackgroundTaskIdentifier _backgroundTask;
@@ -84,7 +84,7 @@
     if (!self)
         return nil;
 
-#if !HAVE(RUNNINGBOARD_WEBKIT_ASSERTIONS)
+#if !HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS)
     _backgroundTask = UIBackgroundTaskInvalid;
 #endif
 
@@ -169,7 +169,7 @@
 
 - (BOOL)_hasBackgroundTask
 {
-#if HAVE(RUNNINGBOARD_WEBKIT_ASSERTIONS)
+#if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS)
     return !!_backgroundTask;
 #else
     return _backgroundTask != UIBackgroundTaskInvalid;
@@ -184,7 +184,7 @@
             return;
         }
         RELEASE_LOG(ProcessSuspension, "%p - WKProcessAssertionBackgroundTaskManager: beginBackgroundTaskWithName", self);
-#if HAVE(RUNNINGBOARD_WEBKIT_ASSERTIONS)
+#if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS)
         RBSTarget *target = [RBSTarget currentProcess];
         RBSDomainAttribute *domainAttribute = [RBSDomainAttribute attributeWithDomain:@"com.apple.common" name:@"FinishTaskInterruptable"];
         _backgroundTask = adoptNS([[RBSAssertion alloc] initWithExplanation:@"WebKit UIProcess background task" target:target attributes:@[domainAttribute]]);
@@ -204,7 +204,7 @@
         [self _releaseBackgroundTask];
 }
 
-#if HAVE(RUNNINGBOARD_WEBKIT_ASSERTIONS)
+#if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS)
 - (void)assertionWillInvalidate:(RBSAssertion *)assertion
 {
     ASSERT(assertion == _backgroundTask.get());
@@ -253,7 +253,7 @@
     if (_applicationIsBackgrounded)
         WebKit::WebProcessPool::notifyProcessPoolsApplicationIsAboutToSuspend();
 
-#if HAVE(RUNNINGBOARD_WEBKIT_ASSERTIONS)
+#if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS)
     [_backgroundTask removeObserver:self];
     [_backgroundTask invalidate];
     _backgroundTask = nullptr;
@@ -291,7 +291,7 @@
 
 static NSString *runningBoardNameForAssertionType(ProcessAssertionType assertionType)
 {
-#if HAVE(RUNNINGBOARD_WEBKIT_ASSERTIONS)
+#if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS)
     switch (assertionType) {
     case ProcessAssertionType::Suspended:
         return @"Suspended";
@@ -301,11 +301,14 @@
         return @"UnboundedNetworking";
     case ProcessAssertionType::Foreground:
         return @"Foreground";
+    case ProcessAssertionType::DependentProcessLink:
+        return @"DependentProcessLink";
     case ProcessAssertionType::MediaPlayback:
         return nil; // FIXME: Name to be defined in <rdar://problem/61263147>.
     }
 #else
-    UNUSED_PARAM(assertionType);
+    if (assertionType == ProcessAssertionType::DependentProcessLink)
+        return @"DependentProcessLink";
     return nil;
 #endif
 }
@@ -325,6 +328,9 @@
     case ProcessAssertionType::Foreground:
     case ProcessAssertionType::MediaPlayback:
         return foregroundTabFlags;
+    case ProcessAssertionType::DependentProcessLink:
+        ASSERT_NOT_REACHED();
+        return backgroundTabFlags;
     }
 }
 
@@ -339,6 +345,9 @@
         return BKSProcessAssertionReasonFinishTaskUnbounded;
     case ProcessAssertionType::MediaPlayback:
         return BKSProcessAssertionReasonMediaPlayback;
+    case ProcessAssertionType::DependentProcessLink:
+        ASSERT_NOT_REACHED();
+        return BKSProcessAssertionReasonExtension;
     }
 }
 

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (259673 => 259674)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2020-04-07 22:09:36 UTC (rev 259674)
@@ -3551,9 +3551,6 @@
 		46CE3B1023D8C83D0016A96A /* WebBackForwardListCounts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebBackForwardListCounts.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>"; };
 		4960A3BC23C5286400961842 /* WebViewCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebViewCategory.h; sourceTree = "<group>"; };
@@ -5968,8 +5965,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 */,
@@ -6897,7 +6892,6 @@
 			isa = PBXGroup;
 			children = (
 				A7E93CEB192531AA00A1DC48 /* AuxiliaryProcessIOS.mm */,
-				46F38E8A2416D9A70059375A /* DependencyProcessAssertionIOS.mm */,
 				2DA6731920C754B1003CB401 /* DynamicViewportSizeUpdate.h */,
 				2DA9449D1884E4F000ED86DB /* GestureTypes.h */,
 				C5BCE5DA1C50761D00CDE3FA /* InteractionInformationAtPosition.h */,

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (259673 => 259674)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2020-04-07 22:09:36 UTC (rev 259674)
@@ -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"
@@ -43,6 +42,7 @@
 #include "NetworkSession.h"
 #include "NetworkSessionCreationParameters.h"
 #include "PluginProcessConnectionManager.h"
+#include "ProcessAssertion.h"
 #include "RemoteAudioSession.h"
 #include "RemoteLegacyCDMFactory.h"
 #include "StorageAreaMap.h"
@@ -299,9 +299,9 @@
 
     ASSERT(!m_uiProcessDependencyProcessAssertion);
     if (auto remoteProcessID = connection->remoteProcessID())
-        m_uiProcessDependencyProcessAssertion = makeUnique<DependencyProcessAssertion>(remoteProcessID, "WebContent process dependency on UIProcess"_s);
+        m_uiProcessDependencyProcessAssertion = makeUnique<ProcessAssertion>(remoteProcessID, "WebContent process dependency on UIProcess"_s, ProcessAssertionType::DependentProcessLink);
     else
-        RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSuspension, "Unable to create a process depending assertion on UIProcess because remoteProcessID is 0");
+        RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSuspension, "Unable to create a process dependency assertion on UIProcess because remoteProcessID is 0");
 #endif // PLATFORM(IOS_FAMILY)
 
     m_webInspectorInterruptDispatcher->initializeConnection(connection);

Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (259673 => 259674)


--- trunk/Source/WebKit/WebProcess/WebProcess.h	2020-04-07 22:07:54 UTC (rev 259673)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h	2020-04-07 22:09:36 UTC (rev 259674)
@@ -98,7 +98,6 @@
 
 namespace WebKit {
 
-class DependencyProcessAssertion;
 class EventDispatcher;
 class GamepadData;
 class GPUProcessConnection;
@@ -107,6 +106,7 @@
 class LibWebRTCNetwork;
 class NetworkProcessConnection;
 class ObjCObjectGraph;
+class ProcessAssertion;
 struct ServiceWorkerInitializationData;
 class StorageAreaMap;
 class UserData;
@@ -577,7 +577,7 @@
 
 #if PLATFORM(IOS_FAMILY)
     WebSQLiteDatabaseTracker m_webSQLiteDatabaseTracker;
-    std::unique_ptr<DependencyProcessAssertion> m_uiProcessDependencyProcessAssertion;
+    std::unique_ptr<ProcessAssertion> m_uiProcessDependencyProcessAssertion;
 #endif
 
     enum PageMarkingLayersAsVolatileCounterType { };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to