Changeset 259674 in webkit
- Timestamp:
- Apr 7, 2020 3:09:36 PM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 3 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r259652 r259674 1 2020-04-07 Chris Dumez <cdumez@apple.com> 2 3 Merge DependencyAssertion into ProcessAssertion 4 https://bugs.webkit.org/show_bug.cgi?id=210076 5 6 Reviewed by Alex Christensen. 7 8 * wtf/PlatformHave.h: 9 1 10 2020-04-07 Saam Barati <sbarati@apple.com> 2 11 -
trunk/Source/WTF/wtf/PlatformHave.h
r259414 r259674 460 460 || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \ 461 461 || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000) 462 #define HAVE_RUNNINGBOARD_ WEBKIT_ASSERTIONS 1462 #define HAVE_RUNNINGBOARD_VISIBILITY_ASSERTIONS 1 463 463 #endif 464 464 -
trunk/Source/WebKit/ChangeLog
r259673 r259674 1 2020-04-07 Chris Dumez <cdumez@apple.com> 2 3 Merge DependencyAssertion into ProcessAssertion 4 https://bugs.webkit.org/show_bug.cgi?id=210076 5 6 Reviewed by Alex Christensen. 7 8 Merge DependencyAssertion into ProcessAssertion. After r259610, ProcessAssertion can use 9 RunningBoard assertions so there is no longer any need to a separate DependencyAssertion 10 class. We can simply introduce a new assertion type to ProcessAssertion. 11 12 * Shared/DependencyProcessAssertion.cpp: Removed. 13 * Shared/DependencyProcessAssertion.h: Removed. 14 * Shared/ios/DependencyProcessAssertionIOS.mm: Removed. 15 * Sources.txt: 16 * SourcesCocoa.txt: 17 * UIProcess/ProcessAssertion.h: 18 * UIProcess/ios/ProcessAssertionIOS.mm: 19 (-[WKProcessAssertionBackgroundTaskManager init]): 20 (-[WKProcessAssertionBackgroundTaskManager _hasBackgroundTask]): 21 (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): 22 (-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]): 23 (WebKit::runningBoardNameForAssertionType): 24 * WebKit.xcodeproj/project.pbxproj: 25 * WebProcess/WebProcess.cpp: 26 (WebKit::WebProcess::initializeConnection): 27 * WebProcess/WebProcess.h: 28 1 29 2020-04-07 Alex Christensen <achristensen@webkit.org> 2 30 -
trunk/Source/WebKit/Sources.txt
r259307 r259674 157 157 Shared/ContextMenuContextData.cpp 158 158 Shared/DebuggableInfoData.cpp 159 Shared/DependencyProcessAssertion.cpp160 159 Shared/EditingRange.cpp 161 160 Shared/EditorState.cpp -
trunk/Source/WebKit/SourcesCocoa.txt
r258180 r259674 175 175 176 176 Shared/ios/AuxiliaryProcessIOS.mm 177 Shared/ios/DependencyProcessAssertionIOS.mm178 177 Shared/ios/InteractionInformationAtPosition.mm 179 178 Shared/ios/InteractionInformationRequest.cpp -
trunk/Source/WebKit/UIProcess/ProcessAssertion.h
r259610 r259674 51 51 Foreground, 52 52 MediaPlayback, 53 DependentProcessLink, 53 54 }; 54 55 -
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
r259540 r259674 1368 1368 case ProcessAssertionType::MediaPlayback: 1369 1369 case ProcessAssertionType::UnboundedNetworking: 1370 case ProcessAssertionType::DependentProcessLink: 1370 1371 ASSERT_NOT_REACHED(); 1371 1372 } -
trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm
r259635 r259674 47 47 48 48 @interface WKProcessAssertionBackgroundTaskManager 49 #if HAVE(RUNNINGBOARD_ WEBKIT_ASSERTIONS)49 #if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS) 50 50 : NSObject <RBSAssertionObserving> 51 51 #else … … 62 62 @implementation WKProcessAssertionBackgroundTaskManager 63 63 { 64 #if HAVE(RUNNINGBOARD_ WEBKIT_ASSERTIONS)64 #if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS) 65 65 RetainPtr<RBSAssertion> _backgroundTask; 66 66 #else … … 85 85 return nil; 86 86 87 #if !HAVE(RUNNINGBOARD_ WEBKIT_ASSERTIONS)87 #if !HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS) 88 88 _backgroundTask = UIBackgroundTaskInvalid; 89 89 #endif … … 170 170 - (BOOL)_hasBackgroundTask 171 171 { 172 #if HAVE(RUNNINGBOARD_ WEBKIT_ASSERTIONS)172 #if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS) 173 173 return !!_backgroundTask; 174 174 #else … … 185 185 } 186 186 RELEASE_LOG(ProcessSuspension, "%p - WKProcessAssertionBackgroundTaskManager: beginBackgroundTaskWithName", self); 187 #if HAVE(RUNNINGBOARD_ WEBKIT_ASSERTIONS)187 #if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS) 188 188 RBSTarget *target = [RBSTarget currentProcess]; 189 189 RBSDomainAttribute *domainAttribute = [RBSDomainAttribute attributeWithDomain:@"com.apple.common" name:@"FinishTaskInterruptable"]; … … 205 205 } 206 206 207 #if HAVE(RUNNINGBOARD_ WEBKIT_ASSERTIONS)207 #if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS) 208 208 - (void)assertionWillInvalidate:(RBSAssertion *)assertion 209 209 { … … 254 254 WebKit::WebProcessPool::notifyProcessPoolsApplicationIsAboutToSuspend(); 255 255 256 #if HAVE(RUNNINGBOARD_ WEBKIT_ASSERTIONS)256 #if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS) 257 257 [_backgroundTask removeObserver:self]; 258 258 [_backgroundTask invalidate]; … … 292 292 static NSString *runningBoardNameForAssertionType(ProcessAssertionType assertionType) 293 293 { 294 #if HAVE(RUNNINGBOARD_ WEBKIT_ASSERTIONS)294 #if HAVE(RUNNINGBOARD_VISIBILITY_ASSERTIONS) 295 295 switch (assertionType) { 296 296 case ProcessAssertionType::Suspended: … … 302 302 case ProcessAssertionType::Foreground: 303 303 return @"Foreground"; 304 case ProcessAssertionType::DependentProcessLink: 305 return @"DependentProcessLink"; 304 306 case ProcessAssertionType::MediaPlayback: 305 307 return nil; // FIXME: Name to be defined in <rdar://problem/61263147>. 306 308 } 307 309 #else 308 UNUSED_PARAM(assertionType); 310 if (assertionType == ProcessAssertionType::DependentProcessLink) 311 return @"DependentProcessLink"; 309 312 return nil; 310 313 #endif … … 326 329 case ProcessAssertionType::MediaPlayback: 327 330 return foregroundTabFlags; 331 case ProcessAssertionType::DependentProcessLink: 332 ASSERT_NOT_REACHED(); 333 return backgroundTabFlags; 328 334 } 329 335 } … … 340 346 case ProcessAssertionType::MediaPlayback: 341 347 return BKSProcessAssertionReasonMediaPlayback; 348 case ProcessAssertionType::DependentProcessLink: 349 ASSERT_NOT_REACHED(); 350 return BKSProcessAssertionReasonExtension; 342 351 } 343 352 } -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r259307 r259674 3552 3552 46DF06391F3905E5001980BB /* NetworkCORSPreflightChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkCORSPreflightChecker.cpp; sourceTree = "<group>"; }; 3553 3553 46DF063A1F3905E5001980BB /* NetworkCORSPreflightChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkCORSPreflightChecker.h; sourceTree = "<group>"; }; 3554 46F38E882416D9630059375A /* DependencyProcessAssertion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DependencyProcessAssertion.cpp; sourceTree = "<group>"; };3555 46F38E892416D9630059375A /* DependencyProcessAssertion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DependencyProcessAssertion.h; sourceTree = "<group>"; };3556 46F38E8A2416D9A70059375A /* DependencyProcessAssertionIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DependencyProcessAssertionIOS.mm; path = ios/DependencyProcessAssertionIOS.mm; sourceTree = "<group>"; };3557 3554 46F38E8B2416E66D0059375A /* RunningBoardServicesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunningBoardServicesSPI.h; sourceTree = "<group>"; }; 3558 3555 46F9B26223526ED0006FE5FA /* WebBackForwardCacheEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebBackForwardCacheEntry.h; sourceTree = "<group>"; }; … … 5969 5966 99036AE823A970870000B06A /* DebuggableInfoData.cpp */, 5970 5967 99036AE723A970870000B06A /* DebuggableInfoData.h */, 5971 46F38E882416D9630059375A /* DependencyProcessAssertion.cpp */,5972 46F38E892416D9630059375A /* DependencyProcessAssertion.h */,5973 5968 2D7FD190223C730F007887F1 /* DocumentEditingContext.h */, 5974 5969 2D7FD191223C7310007887F1 /* DocumentEditingContext.mm */, … … 6898 6893 children = ( 6899 6894 A7E93CEB192531AA00A1DC48 /* AuxiliaryProcessIOS.mm */, 6900 46F38E8A2416D9A70059375A /* DependencyProcessAssertionIOS.mm */,6901 6895 2DA6731920C754B1003CB401 /* DynamicViewportSizeUpdate.h */, 6902 6896 2DA9449D1884E4F000ED86DB /* GestureTypes.h */, -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r259673 r259674 32 32 #include "AuthenticationManager.h" 33 33 #include "AuxiliaryProcessMessages.h" 34 #include "DependencyProcessAssertion.h"35 34 #include "DrawingArea.h" 36 35 #include "EventDispatcher.h" … … 44 43 #include "NetworkSessionCreationParameters.h" 45 44 #include "PluginProcessConnectionManager.h" 45 #include "ProcessAssertion.h" 46 46 #include "RemoteAudioSession.h" 47 47 #include "RemoteLegacyCDMFactory.h" … … 300 300 ASSERT(!m_uiProcessDependencyProcessAssertion); 301 301 if (auto remoteProcessID = connection->remoteProcessID()) 302 m_uiProcessDependencyProcessAssertion = makeUnique< DependencyProcessAssertion>(remoteProcessID, "WebContent process dependency on UIProcess"_s);302 m_uiProcessDependencyProcessAssertion = makeUnique<ProcessAssertion>(remoteProcessID, "WebContent process dependency on UIProcess"_s, ProcessAssertionType::DependentProcessLink); 303 303 else 304 RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSuspension, "Unable to create a process depend ingassertion on UIProcess because remoteProcessID is 0");304 RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSuspension, "Unable to create a process dependency assertion on UIProcess because remoteProcessID is 0"); 305 305 #endif // PLATFORM(IOS_FAMILY) 306 306 -
trunk/Source/WebKit/WebProcess/WebProcess.h
r259236 r259674 99 99 namespace WebKit { 100 100 101 class DependencyProcessAssertion;102 101 class EventDispatcher; 103 102 class GamepadData; … … 108 107 class NetworkProcessConnection; 109 108 class ObjCObjectGraph; 109 class ProcessAssertion; 110 110 struct ServiceWorkerInitializationData; 111 111 class StorageAreaMap; … … 578 578 #if PLATFORM(IOS_FAMILY) 579 579 WebSQLiteDatabaseTracker m_webSQLiteDatabaseTracker; 580 std::unique_ptr< DependencyProcessAssertion> m_uiProcessDependencyProcessAssertion;580 std::unique_ptr<ProcessAssertion> m_uiProcessDependencyProcessAssertion; 581 581 #endif 582 582
Note: See TracChangeset
for help on using the changeset viewer.