Use CheckedPtr / CheckedRef less for non-stack objects#21886
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Dec 16, 2023
Merged
Use CheckedPtr / CheckedRef less for non-stack objects#21886webkit-commit-queue merged 1 commit intoWebKit:mainfrom
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 95a1454) Details
|
darinadler
approved these changes
Dec 16, 2023
Member
darinadler
left a comment
There was a problem hiding this comment.
Is it safe to use weak pointers as hash table keys?
Source/WebCore/page/EventHandler.cpp
Outdated
Member
There was a problem hiding this comment.
No need for the get() now that it’s a RefPtr.
Contributor
Author
I made sure that WeakRef<> works fine as hash table key. Of course, it will crash if the object gets destroyed but it should crash safely:
|
95a1454 to
3685f97
Compare
Collaborator
|
EWS run on current version of this PR (hash 3685f97) Details |
rniwa
approved these changes
Dec 16, 2023
https://bugs.webkit.org/show_bug.cgi?id=266503 Reviewed by Darin Adler and Ryosuke Niwa. * Source/WebCore/accessibility/AXObjectCache.h: * Source/WebCore/accessibility/AccessibilityScrollView.h: * Source/WebCore/loader/ApplicationManifestLoader.h: * Source/WebCore/loader/DocumentLoader.h: * Source/WebCore/loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::ApplicationCacheHost): * Source/WebCore/loader/appcache/ApplicationCacheHost.h: * Source/WebCore/loader/cache/CachedResourceLoader.h: * Source/WebCore/loader/icon/IconLoader.h: * Source/WebCore/page/DOMWindowExtension.h: * Source/WebCore/page/EventHandler.cpp: (WebCore::widgetForElement): (WebCore::EventHandler::completeWidgetWheelEvent): (WebCore::EventHandler::handleWheelEventInternal): * Source/WebCore/page/EventHandler.h: * Source/WebCore/page/LocalFrameView.cpp: (WebCore::LocalFrameView::didAddWidgetToRenderTree): (WebCore::LocalFrameView::willRemoveWidgetFromRenderTree): (WebCore::collectAndProtectWidgets): (WebCore::LocalFrameView::updateWidgetPositions): * Source/WebCore/page/LocalFrameView.h: * Source/WebCore/page/PageOverlay.h: * Source/WebCore/page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const): * Source/WebCore/platform/ScrollView.h: * Source/WebCore/platform/Widget.h: * Source/WebCore/platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::unregisterScrollbar): * Source/WebCore/platform/mac/ScrollbarsControllerMac.mm: * Source/WebCore/rendering/CounterNode.cpp: (WebCore::CounterNode::~CounterNode): (WebCore::CounterNode::nextInPreOrderAfterChildren const): (WebCore::CounterNode::lastDescendant const): (WebCore::CounterNode::previousInPreOrder const): (WebCore::CounterNode::resetThisAndDescendantsRenderers): (WebCore::CounterNode::recount): (WebCore::CounterNode::insertAfter): (WebCore::CounterNode::removeChild): * Source/WebCore/rendering/CounterNode.h: * Source/WebCore/rendering/RenderCounter.cpp: (WebCore::makeCounterNode): (WebCore::RenderCounter::originalText const): * Source/WebCore/rendering/RenderCounter.h: * Source/WebKit/WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: (WebKit::InjectedBundleDOMWindowExtension::InjectedBundleDOMWindowExtension): (WebKit::InjectedBundleDOMWindowExtension::~InjectedBundleDOMWindowExtension): * Source/WebKit/WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h: * Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h: * Source/WebKit/WebProcess/WebPage/WebPage.h: * Source/WebKit/WebProcess/WebPage/WebPageOverlay.cpp: (WebKit::overlayMap): (WebKit::WebPageOverlay::WebPageOverlay): (WebKit::WebPageOverlay::~WebPageOverlay): (WebKit::WebPageOverlay::fromCoreOverlay): * Source/WebKit/WebProcess/WebPage/WebPageOverlay.h: Canonical link: https://commits.webkit.org/272165@main
3685f97 to
98667dc
Compare
Collaborator
|
Committed 272165@main (98667dc): https://commits.webkit.org/272165@main Reviewed commits have been landed. Closing PR #21886 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.
98667dc
3685f97
🧪 wpe-wk2🧪 ios-wk2-wpt