Changeset 254433 in webkit
- Timestamp:
- Jan 13, 2020 9:14:25 AM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r254428 r254433 1 2020-01-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [macCatalyst] UI process crashes on launch after r254101 4 https://bugs.webkit.org/show_bug.cgi?id=206156 5 <rdar://problem/58514942> 6 7 Reviewed by Brent Fulgham. 8 9 Fixes the crash by not soft-linking BackBoardServices in an attempt to invoke BKSDisplayBrightnessGetCurrent on 10 macCatalyst. Prior to r254101, this was only defined on iOS and not watchOS or tvOS; after this change, it 11 should be defined only on iOS, watchOS and tvOS. 12 13 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 14 (WebKit::WebProcessPool::registerNotificationObservers): 15 * UIProcess/WebProcessPool.cpp: 16 (WebKit::WebProcessPool::initializeNewWebProcess): 17 * UIProcess/WebProcessPool.h: 18 * WebProcess/WebProcess.h: 19 * WebProcess/WebProcess.messages.in: 20 * WebProcess/cocoa/WebProcessCocoa.mm: 21 1 22 2020-01-13 Antti Koivisto <antti@apple.com> 2 23 -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r254397 r254433 103 103 #endif 104 104 105 #if PLATFORM(IOS_FAMILY) 105 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) 106 106 SOFT_LINK_PRIVATE_FRAMEWORK(BackBoardServices) 107 107 SOFT_LINK(BackBoardServices, BKSDisplayBrightnessGetCurrent, float, (), ()); … … 492 492 } 493 493 494 #if PLATFORM(IOS_FAMILY) 494 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) 495 495 float WebProcessPool::displayBrightness() 496 496 { … … 551 551 setApplicationIsActive(false); 552 552 }]; 553 #el se553 #elif !PLATFORM(MACCATALYST) 554 554 CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, static_cast<CFStringRef>(UIBacklightLevelChangedNotification), nullptr, CFNotificationSuspensionBehaviorCoalesce); 555 555 #if PLATFORM(IOS) -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r254293 r254433 1056 1056 } 1057 1057 1058 #if PLATFORM(IOS_FAMILY) 1058 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) 1059 1059 process.send(Messages::WebProcess::BacklightLevelDidChange(displayBrightness()), 0); 1060 1060 #endif -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r254101 r254433 606 606 void updateBackForwardCacheCapacity(); 607 607 608 #if PLATFORM(IOS_FAMILY) 608 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) 609 609 static float displayBrightness(); 610 610 static void backlightLevelDidChangeCallback(CFNotificationCenterRef, void *observer, CFStringRef name, const void *, CFDictionaryRef userInfo); -
trunk/Source/WebKit/WebProcess/WebProcess.h
r254210 r254433 288 288 #endif 289 289 290 #if PLATFORM(IOS_FAMILY) 290 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) 291 291 float backlightLevel() const { return m_backlightLevel; } 292 292 #endif … … 461 461 #endif 462 462 463 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) 464 void backlightLevelDidChange(float backlightLevel); 465 #endif 466 463 467 #if PLATFORM(IOS_FAMILY) 464 void backlightLevelDidChange(float backlightLevel);465 466 468 bool shouldFreezeOnSuspension() const; 467 469 void updateFreezerStatus(); … … 590 592 #endif 591 593 592 #if PLATFORM(IOS_FAMILY) 594 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) 593 595 float m_backlightLevel { 0 }; 594 596 #endif -
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
r254101 r254433 126 126 #endif 127 127 128 #if PLATFORM(IOS_FAMILY) 128 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) 129 129 BacklightLevelDidChange(float backlightLevel) 130 130 #endif -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r254373 r254433 820 820 #endif 821 821 822 #if PLATFORM(IOS_FAMILY) 822 #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) 823 823 static float currentBacklightLevel() 824 824 {
Note: See TracChangeset
for help on using the changeset viewer.