[iOS] CheckedPtr crash under [WebThermalMitigationObserver thermalStateDidChange]#63389
Merged
webkit-commit-queue merged 1 commit intoApr 23, 2026
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 7eb007f) Details
|
rniwa
reviewed
Apr 23, 2026
| @@ -444,7 +444,7 @@ Page::Page(PageConfiguration&& pageConfiguration) | |||
| , m_isUtilityPage(isUtilityPageChromeClient(chrome().client())) | |||
| , m_performanceMonitor(isUtilityPage() ? nullptr : makeUniqueWithoutRefCountedCheck<PerformanceMonitor>(*this)) | |||
| , m_lowPowerModeNotifier(makeUniqueRef<LowPowerModeNotifier>([this](bool isLowPowerModeEnabled) { handleLowPowerModeChange(isLowPowerModeEnabled); })) | |||
| , m_thermalMitigationNotifier(makeUniqueRef<ThermalMitigationNotifier>([this](bool thermalMitigationEnabled) { handleThermalMitigationChange(thermalMitigationEnabled); })) | |||
| , m_thermalMitigationNotifier(ThermalMitigationNotifier::create([weakThis = WeakPtr { *this }](bool thermalMitigationEnabled) { if (RefPtr protectedThis = weakThis) protectedThis->handleThermalMitigationChange(thermalMitigationEnabled); })) | |||
Member
There was a problem hiding this comment.
There are so many parentheses / brackets here that it's hard to follow.
Can we insert line breaks?
rniwa
approved these changes
Apr 23, 2026
7eb007f to
43774df
Compare
Collaborator
|
EWS run on current version of this PR (hash 43774df) Details
|
…teDidChange] https://bugs.webkit.org/show_bug.cgi?id=313091 rdar://170616981 Reviewed by Ryosuke Niwa. Make ThermalMitigationNotifier ref-counted instead of CanMakeCheckedPtr and protect this in `[WebThermalMitigationObserver thermalStateDidChange]` before calling notifyThermalMitigationChanged() on it. * Source/WebCore/page/Page.cpp: (WebCore::m_thermalMitigationNotifier): * Source/WebCore/page/Page.h: * Source/WebCore/platform/ThermalMitigationNotifier.cpp: (WebCore::ThermalMitigationNotifier::create): * Source/WebCore/platform/ThermalMitigationNotifier.h: * Source/WebCore/platform/cocoa/ThermalMitigationNotifier.mm: (-[WebThermalMitigationObserver thermalStateDidChange]): * Source/WebKit/NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::Cache): * Source/WebKit/NetworkProcess/cache/NetworkCache.h: Canonical link: https://commits.webkit.org/311843@main
43774df to
421f42a
Compare
Collaborator
|
Committed 311843@main (421f42a): https://commits.webkit.org/311843@main Reviewed commits have been landed. Closing PR #63389 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
421f42a
43774df
🛠 win🧪 win-tests🧪 api-mac🧪 ios-wk2-wpt🧪 api-mac-debug🧪 api-ios🧪 mac-AS-debug-wk2🧪 mac-intel-wk2