Summary: | Fix crashes when NetworkResourceLoader/NetworkLoadChecker are destroyed during HTTPS upgrade check | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||||
Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, commit-queue, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Alex Christensen
2019-03-01 19:55:49 PST
Created attachment 363402 [details]
Patch
Comment on attachment 363402 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363402&action=review > Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:227 > + applyHTTPSUpgradeIfNeeded(WTFMove(request), [this, weakThis = makeWeakPtr(*this), client, handler = WTFMove(handler), originalRequest = WTFMove(originalRequest)](auto request) mutable { Seems suspicious that you'd fix this here but not in the processContentExtensionRulesForLoad() lambda below... processContentExtensionRulesForLoad's implementation currently already has this protection, but there's no reason not to make this more robust. Created attachment 363534 [details]
Patch
Comment on attachment 363534 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363534&action=review > Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:244 > + if (!weakThis) Personally, I would have put this below the if (!result.has_value()) check so that we may return a more accurate exception when we already have one. Created attachment 363539 [details]
Patch
Comment on attachment 363539 [details] Patch Clearing flags on attachment: 363539 Committed r242377: <https://trac.webkit.org/changeset/242377> All reviewed patches have been landed. Closing bug. |