Changeset 254522 in webkit
- Timestamp:
- Jan 14, 2020 11:37:23 AM (4 years ago)
- Location:
- branches/safari-610.1.1-branch/Source/WebKit
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-610.1.1-branch/Source/WebKit/ChangeLog
r254521 r254522 1 2020-01-14 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r254433. rdar://problem/58554516 4 5 [macCatalyst] UI process crashes on launch after r254101 6 https://bugs.webkit.org/show_bug.cgi?id=206156 7 <rdar://problem/58514942> 8 9 Reviewed by Brent Fulgham. 10 11 Fixes the crash by not soft-linking BackBoardServices in an attempt to invoke BKSDisplayBrightnessGetCurrent on 12 macCatalyst. Prior to r254101, this was only defined on iOS and not watchOS or tvOS; after this change, it 13 should be defined only on iOS, watchOS and tvOS. 14 15 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 16 (WebKit::WebProcessPool::registerNotificationObservers): 17 * UIProcess/WebProcessPool.cpp: 18 (WebKit::WebProcessPool::initializeNewWebProcess): 19 * UIProcess/WebProcessPool.h: 20 * WebProcess/WebProcess.h: 21 * WebProcess/WebProcess.messages.in: 22 * WebProcess/cocoa/WebProcessCocoa.mm: 23 24 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254433 268f45cc-cd09-0410-ab3c-d52691b4dbfc 25 26 2020-01-12 Wenson Hsieh <wenson_hsieh@apple.com> 27 28 [macCatalyst] UI process crashes on launch after r254101 29 https://bugs.webkit.org/show_bug.cgi?id=206156 30 <rdar://problem/58514942> 31 32 Reviewed by Brent Fulgham. 33 34 Fixes the crash by not soft-linking BackBoardServices in an attempt to invoke BKSDisplayBrightnessGetCurrent on 35 macCatalyst. Prior to r254101, this was only defined on iOS and not watchOS or tvOS; after this change, it 36 should be defined only on iOS, watchOS and tvOS. 37 38 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 39 (WebKit::WebProcessPool::registerNotificationObservers): 40 * UIProcess/WebProcessPool.cpp: 41 (WebKit::WebProcessPool::initializeNewWebProcess): 42 * UIProcess/WebProcessPool.h: 43 * WebProcess/WebProcess.h: 44 * WebProcess/WebProcess.messages.in: 45 * WebProcess/cocoa/WebProcessCocoa.mm: 46 1 47 2020-01-14 Kocsen Chung <kocsen_chung@apple.com> 2 48 -
branches/safari-610.1.1-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r254397 r254522 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) -
branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessPool.cpp
r254293 r254522 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 -
branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessPool.h
r254101 r254522 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); -
branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.h
r254210 r254522 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 -
branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.messages.in
r254101 r254522 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 -
branches/safari-610.1.1-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r254373 r254522 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.