-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Address assorted smart pointer warnings in WebCore #47110
Conversation
EWS run on previous version of this PR (hash 2f13d6a) |
Safer C++ Build #41378 (2f13d6a)
|
if (!scope) | ||
return std::nullopt; | ||
|
||
return resolveCharacterRange(makeRangeSelectingNodeContents(*scope), range); | ||
return resolveCharacterRange(makeRangeSelectingNodeContents(scope.releaseNonNull()), range); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
releaseNonNull() isn't needed
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
2f13d6a
to
0c962ac
Compare
EWS run on previous version of this PR (hash 0c962ac) |
0c962ac
to
8491bd8
Compare
EWS run on current version of this PR (hash 8491bd8) |
https://bugs.webkit.org/show_bug.cgi?id=294894 Reviewed by Charlie Wolfe. Apply https://github.com/WebKit/WebKit/wiki/Safer-CPP-Guidelines Canonical link: https://commits.webkit.org/296577@main
8491bd8
to
ac4ce30
Compare
Committed 296577@main (ac4ce30): https://commits.webkit.org/296577@main Reviewed commits have been landed. Closing PR #47110 and removing active labels. |
ac4ce30
8491bd8
🛠 wpe🛠 win🧪 wpe-wk2🧪 win-tests🧪 ios-wk2🧪 api-mac🧪 api-wpe🧪 ios-wk2-wpt🧪 mac-wk1🛠 wpe-cairo🧪 api-ios🧪 mac-wk2🧪 mac-AS-debug-wk2🧪 gtk-wk2🧪 mac-wk2-stress🧪 api-gtk🧪 vision-wk2🧪 mac-intel-wk2🛠 playstation🛠 mac-safer-cpp🛠 tv-sim🛠 watch🛠 watch-sim