Skip to content
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

Make NetworkStorageSession::nsCookieStorage() return RetainPtr #26104

Conversation

szewai
Copy link
Contributor

@szewai szewai commented Mar 19, 2024

dd766a3

Make NetworkStorageSession::nsCookieStorage() return RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=271222
rdar://117317285

Reviewed by Chris Dumez.

To avoid the returned NSHTTPCookieStorage being released while it's still in use.

* Source/WebCore/platform/network/NetworkStorageSession.h:
* Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::getAllCookies):
(WebCore::NetworkStorageSession::hasCookies const):
(WebCore::NetworkStorageSession::setAllCookiesToSameSiteStrict):
(WebCore::NetworkStorageSession::nsCookieStorage const):
(WebCore::NetworkStorageSession::cookieStorageObserver const):
* Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
* Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformFlushCookies):
* Source/WebKit/NetworkProcess/cocoa/NetworkTaskCocoa.mm:
(WebKit::NetworkTaskCocoa::unblockCookies):

Canonical link: https://commits.webkit.org/276355@main

f44b555

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug loading-orange 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-skia
⏳ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 tv-sim ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@szewai szewai requested a review from cdumez as a code owner March 19, 2024 06:18
@szewai szewai self-assigned this Mar 19, 2024
@szewai szewai added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Mar 19, 2024
@szewai szewai added the merge-queue Applied to send a pull request to merge-queue label Mar 19, 2024
https://bugs.webkit.org/show_bug.cgi?id=271222
rdar://117317285

Reviewed by Chris Dumez.

To avoid the returned NSHTTPCookieStorage being released while it's still in use.

* Source/WebCore/platform/network/NetworkStorageSession.h:
* Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::getAllCookies):
(WebCore::NetworkStorageSession::hasCookies const):
(WebCore::NetworkStorageSession::setAllCookiesToSameSiteStrict):
(WebCore::NetworkStorageSession::nsCookieStorage const):
(WebCore::NetworkStorageSession::cookieStorageObserver const):
* Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
* Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformFlushCookies):
* Source/WebKit/NetworkProcess/cocoa/NetworkTaskCocoa.mm:
(WebKit::NetworkTaskCocoa::unblockCookies):

Canonical link: https://commits.webkit.org/276355@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Make-NetworkStorageSessionnsCookieStorage-return-RetainPtr branch from f44b555 to dd766a3 Compare March 19, 2024 17:51
@webkit-commit-queue
Copy link
Collaborator

Committed 276355@main (dd766a3): https://commits.webkit.org/276355@main

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

@webkit-commit-queue webkit-commit-queue merged commit dd766a3 into WebKit:main Mar 19, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
4 participants