Diff
Modified: branches/safari-610.1.1-branch/Source/WebKit/ChangeLog (254521 => 254522)
--- branches/safari-610.1.1-branch/Source/WebKit/ChangeLog 2020-01-14 19:37:20 UTC (rev 254521)
+++ branches/safari-610.1.1-branch/Source/WebKit/ChangeLog 2020-01-14 19:37:23 UTC (rev 254522)
@@ -1,5 +1,51 @@
2020-01-14 Kocsen Chung <[email protected]>
+ Cherry-pick r254433. rdar://problem/58554516
+
+ [macCatalyst] UI process crashes on launch after r254101
+ https://bugs.webkit.org/show_bug.cgi?id=206156
+ <rdar://problem/58514942>
+
+ Reviewed by Brent Fulgham.
+
+ Fixes the crash by not soft-linking BackBoardServices in an attempt to invoke BKSDisplayBrightnessGetCurrent on
+ macCatalyst. Prior to r254101, this was only defined on iOS and not watchOS or tvOS; after this change, it
+ should be defined only on iOS, watchOS and tvOS.
+
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::WebProcessPool::registerNotificationObservers):
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::initializeNewWebProcess):
+ * UIProcess/WebProcessPool.h:
+ * WebProcess/WebProcess.h:
+ * WebProcess/WebProcess.messages.in:
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-01-12 Wenson Hsieh <[email protected]>
+
+ [macCatalyst] UI process crashes on launch after r254101
+ https://bugs.webkit.org/show_bug.cgi?id=206156
+ <rdar://problem/58514942>
+
+ Reviewed by Brent Fulgham.
+
+ Fixes the crash by not soft-linking BackBoardServices in an attempt to invoke BKSDisplayBrightnessGetCurrent on
+ macCatalyst. Prior to r254101, this was only defined on iOS and not watchOS or tvOS; after this change, it
+ should be defined only on iOS, watchOS and tvOS.
+
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::WebProcessPool::registerNotificationObservers):
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::initializeNewWebProcess):
+ * UIProcess/WebProcessPool.h:
+ * WebProcess/WebProcess.h:
+ * WebProcess/WebProcess.messages.in:
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+
+2020-01-14 Kocsen Chung <[email protected]>
+
Revert r254392. rdar://problem/58542040
2020-01-11 Alex Christensen <[email protected]>
Modified: branches/safari-610.1.1-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (254521 => 254522)
--- branches/safari-610.1.1-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2020-01-14 19:37:20 UTC (rev 254521)
+++ branches/safari-610.1.1-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2020-01-14 19:37:23 UTC (rev 254522)
@@ -102,7 +102,7 @@
static NSString * const WebKitLogCookieInformationDefaultsKey = @"WebKitLogCookieInformation";
#endif
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
SOFT_LINK_PRIVATE_FRAMEWORK(BackBoardServices)
SOFT_LINK(BackBoardServices, BKSDisplayBrightnessGetCurrent, float, (), ());
#endif
@@ -491,7 +491,7 @@
return WTF::hasEntitlement(ensureNetworkProcess().connection()->xpcConnection(), entitlement.utf8().data());
}
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
float WebProcessPool::displayBrightness()
{
return BKSDisplayBrightnessGetCurrent();
@@ -550,7 +550,7 @@
m_deactivationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidResignActiveNotification object:NSApp queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
setApplicationIsActive(false);
}];
-#else
+#elif !PLATFORM(MACCATALYST)
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, static_cast<CFStringRef>(UIBacklightLevelChangedNotification), nullptr, CFNotificationSuspensionBehaviorCoalesce);
#if PLATFORM(IOS)
m_accessibilityEnabledObserver = [[NSNotificationCenter defaultCenter] addObserverForName:(__bridge id)kAXSApplicationAccessibilityEnabledNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *) {
Modified: branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessPool.cpp (254521 => 254522)
--- branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessPool.cpp 2020-01-14 19:37:20 UTC (rev 254521)
+++ branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessPool.cpp 2020-01-14 19:37:23 UTC (rev 254522)
@@ -1055,7 +1055,7 @@
process.send(Messages::WebProcess::PrewarmGlobally(), 0);
}
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
process.send(Messages::WebProcess::BacklightLevelDidChange(displayBrightness()), 0);
#endif
Modified: branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessPool.h (254521 => 254522)
--- branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessPool.h 2020-01-14 19:37:20 UTC (rev 254521)
+++ branches/safari-610.1.1-branch/Source/WebKit/UIProcess/WebProcessPool.h 2020-01-14 19:37:23 UTC (rev 254522)
@@ -605,7 +605,7 @@
void updateBackForwardCacheCapacity();
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
static float displayBrightness();
static void backlightLevelDidChangeCallback(CFNotificationCenterRef, void *observer, CFStringRef name, const void *, CFDictionaryRef userInfo);
#endif
Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.h (254521 => 254522)
--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.h 2020-01-14 19:37:20 UTC (rev 254521)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.h 2020-01-14 19:37:23 UTC (rev 254522)
@@ -287,7 +287,7 @@
void unblockAccessibilityServer(const SandboxExtension::Handle&);
#endif
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
float backlightLevel() const { return m_backlightLevel; }
#endif
@@ -460,9 +460,11 @@
void updateProcessName();
#endif
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
void backlightLevelDidChange(float backlightLevel);
+#endif
+#if PLATFORM(IOS_FAMILY)
bool shouldFreezeOnSuspension() const;
void updateFreezerStatus();
#endif
@@ -589,7 +591,7 @@
HashMap<String, RefPtr<SandboxExtension>> m_mediaCaptureSandboxExtensions;
#endif
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
float m_backlightLevel { 0 };
#endif
Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.messages.in (254521 => 254522)
--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.messages.in 2020-01-14 19:37:20 UTC (rev 254521)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/WebProcess.messages.in 2020-01-14 19:37:23 UTC (rev 254522)
@@ -125,7 +125,7 @@
#endif
#endif
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
BacklightLevelDidChange(float backlightLevel)
#endif
Modified: branches/safari-610.1.1-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (254521 => 254522)
--- branches/safari-610.1.1-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-01-14 19:37:20 UTC (rev 254521)
+++ branches/safari-610.1.1-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-01-14 19:37:23 UTC (rev 254522)
@@ -819,7 +819,7 @@
}
#endif
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
static float currentBacklightLevel()
{
return WebProcess::singleton().backlightLevel();