Skip to content

Address assorted smart pointer warnings in WebCore #47110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

@annevk annevk requested review from cdumez, graouts and rniwa as code owners June 24, 2025 08:40
@annevk annevk self-assigned this Jun 24, 2025
@annevk annevk added the WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit). label Jun 24, 2025
@webkit-ews-buildbot
Copy link
Collaborator

Safer C++ Build #41378 (2f13d6a)

⚠️ Found 15 fixed files! Please update expectations in Source/[Project]/SaferCPPExpectations by running the following commands and update your pull request:

  • Tools/Scripts/update-safer-cpp-expectations -p WebKit --UncountedCallArgsChecker WebProcess/Network/webrtc/LibWebRTCProvider.cpp
  • Tools/Scripts/update-safer-cpp-expectations -p WebCore --UncheckedCallArgsChecker bindings/js/WindowProxy.cpp --UncheckedLocalVarsChecker page/VisualViewport.cpp accessibility/mac/WebAccessibilityObjectWrapperBase.mm platform/cocoa/VideoPresentationModelVideoElement.mm --UncountedLocalVarsChecker Modules/webaudio/WaveShaperDSPKernel.cpp html/track/VideoTrackList.cpp animation/WebAnimation.cpp platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm platform/cocoa/VideoPresentationModelVideoElement.mm html/ValidationMessage.cpp bindings/js/WebCoreJSClientData.cpp page/VisualViewport.cpp accessibility/mac/WebAccessibilityObjectWrapperBase.mm page/UserMessageHandlersNamespace.cpp bridge/objc/WebScriptObject.mm page/VisitedLinkStore.cpp Modules/webaudio/WaveShaperNode.cpp bindings/js/WindowProxy.cpp

if (!scope)
return std::nullopt;

return resolveCharacterRange(makeRangeSelectingNodeContents(*scope), range);
return resolveCharacterRange(makeRangeSelectingNodeContents(scope.releaseNonNull()), range);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

releaseNonNull() isn't needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. We should really only WTFMove() / releaseNonNull() when there is a benefit.

if (!documentElement)
return nil;

auto boundary = resolveCharacterLocation(makeRangeSelectingNodeContents(*documentElement), textIndex);
auto boundary = resolveCharacterLocation(makeRangeSelectingNodeContents(documentElement.releaseNonNull()), textIndex);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

@annevk annevk force-pushed the eng/Address-assorted-smart-pointer-warnings-in-WebCore branch from 2f13d6a to 0c962ac Compare June 24, 2025 16:59
@annevk annevk added the safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks label Jun 24, 2025
@annevk annevk force-pushed the eng/Address-assorted-smart-pointer-warnings-in-WebCore branch from 0c962ac to 8491bd8 Compare June 24, 2025 18:35
@annevk annevk added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 24, 2025
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Address-assorted-smart-pointer-warnings-in-WebCore branch from 8491bd8 to ac4ce30 Compare June 24, 2025 18:37
@webkit-commit-queue
Copy link
Collaborator

Committed 296577@main (ac4ce30): https://commits.webkit.org/296577@main

Reviewed commits have been landed. Closing PR #47110 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit ac4ce30 into WebKit:main Jun 24, 2025
@webkit-commit-queue webkit-commit-queue removed unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Jun 24, 2025
@annevk annevk deleted the eng/Address-assorted-smart-pointer-warnings-in-WebCore branch June 24, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants