-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Address safer CPP warnings in NetworkTaskCocoa #47065
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 safer CPP warnings in NetworkTaskCocoa #47065
Conversation
EWS run on previous version of this PR (hash 194da3f) |
Safer C++ Build #41271 (194da3f)❌ Found 2 failing files with 10 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
194da3f
to
899ae1e
Compare
EWS run on previous version of this PR (hash 899ae1e) |
Safer C++ Build #41285 (899ae1e)❌ Found 2 failing files with 10 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
899ae1e
to
e57cc1a
Compare
EWS run on previous version of this PR (hash e57cc1a) |
Safer C++ Build #41396 (e57cc1a)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
e57cc1a
to
02f9e0d
Compare
EWS run on previous version of this PR (hash 02f9e0d) |
@cdumez made an additional change to fix the remaining warning, please take a look again. |
@@ -67,7 +78,10 @@ static bool shouldCapCookieExpiryForThirdPartyIPAddress(const WebCore::IPAddress | |||
|
|||
bool NetworkTaskCocoa::shouldApplyCookiePolicyForThirdPartyCloaking() const | |||
{ | |||
return m_networkSession->networkStorageSession() && m_networkSession->networkStorageSession()->trackingPreventionEnabled(); | |||
if (CheckedPtr networkStorageSession = checkedNetworkSession()->networkStorageSession()) |
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.
I would have written:
CheckedPtr networkStorageSession = checkedNetworkSession()->networkStorageSession();
return networkStorageSession && networkStorageSession->trackingPreventionEnabled();
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.
Good point, will update.
02f9e0d
to
36c4441
Compare
EWS run on current version of this PR (hash 36c4441) |
Safe-Merge-Queue: Build #61322. |
36c4441
to
a0b7e27
Compare
https://bugs.webkit.org/show_bug.cgi?id=294845 Reviewed by Chris Dumez. * Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): * Source/WebKit/NetworkProcess/cocoa/NetworkTaskCocoa.h: * Source/WebKit/NetworkProcess/cocoa/NetworkTaskCocoa.mm: (WebKit::NetworkTaskCocoa::protectedTask const): (WebKit::NetworkTaskCocoa::checkedNetworkSession const): (WebKit::NetworkTaskCocoa::shouldApplyCookiePolicyForThirdPartyCloaking const): (WebKit::NetworkTaskCocoa::setCookieTransformForFirstPartyRequest): (WebKit::NetworkTaskCocoa::blockCookies): (WebKit::NetworkTaskCocoa::unblockCookies): (WebKit::NetworkTaskCocoa::requestThirdPartyCookieBlockingDecision const): (WebKit::NetworkTaskCocoa::updateTaskWithFirstPartyForSameSiteCookies): (WebKit::NetworkTaskCocoa::willPerformHTTPRedirection): (WebKit::NetworkTaskCocoa::shouldRelaxThirdPartyCookieBlocking const): * Source/WebKit/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations: * Source/WebKit/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations: Canonical link: https://commits.webkit.org/296591@main
a0b7e27
to
3773fb9
Compare
Committed 296591@main (3773fb9): https://commits.webkit.org/296591@main Reviewed commits have been landed. Closing PR #47065 and removing active labels. |
3773fb9
36c4441