Title: [282849] trunk/Source/WebKit
- Revision
- 282849
- Author
- [email protected]
- Date
- 2021-09-21 16:35:41 -0700 (Tue, 21 Sep 2021)
Log Message
Follow-up: WebKit::WebProcessPool should use a weak observer with CFNotificationCenter
<https://webkit.org/b/230227>
<rdar://problem/83067708>
Reviewed by Tim Horton.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers):
- Set m_weakObserver for all platforms at the beginning of the
method. Previously it was only set for macOS.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (282848 => 282849)
--- trunk/Source/WebKit/ChangeLog 2021-09-21 23:03:37 UTC (rev 282848)
+++ trunk/Source/WebKit/ChangeLog 2021-09-21 23:35:41 UTC (rev 282849)
@@ -1,3 +1,16 @@
+2021-09-21 David Kilzer <[email protected]>
+
+ Follow-up: WebKit::WebProcessPool should use a weak observer with CFNotificationCenter
+ <https://webkit.org/b/230227>
+ <rdar://problem/83067708>
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::WebProcessPool::registerNotificationObservers):
+ - Set m_weakObserver for all platforms at the beginning of the
+ method. Previously it was only set for macOS.
+
2021-09-21 Chris Dumez <[email protected]>
Drop makeRefPtr() and use RefPtr { } directly instead
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (282848 => 282849)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2021-09-21 23:03:37 UTC (rev 282848)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2021-09-21 23:35:41 UTC (rev 282849)
@@ -725,6 +725,8 @@
void WebProcessPool::registerNotificationObservers()
{
+ m_weakObserver = adoptNS([[WKProcessPoolWeakObserver alloc] initWithWeakPtr:makeWeakPtr(*this)]);
+
#if !PLATFORM(IOS_FAMILY)
m_powerObserver = makeUnique<WebCore::PowerObserver>([weakThis = makeWeakPtr(this)] {
if (weakThis)
@@ -782,8 +784,6 @@
setApplicationIsActive(false);
}];
- m_weakObserver = adoptNS([[WKProcessPoolWeakObserver alloc] initWithWeakPtr:makeWeakPtr(*this)]);
-
addCFNotificationObserver(colorPreferencesDidChangeCallback, AppleColorPreferencesChangedNotification, CFNotificationCenterGetDistributedCenter());
#elif !PLATFORM(MACCATALYST)
addCFNotificationObserver(backlightLevelDidChangeCallback, (__bridge CFStringRef)UIBacklightLevelChangedNotification);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes