Repository navigation
fix: use BlockedRequest struct to handle webRequest data - #42647
Merged
Merged
Conversation
BlockedRequest struct to handle webRequest data
codebytere
marked this pull request as ready for review
June 25, 2024 16:23
ckerr
reviewed
Jun 25, 2024
codebytere
force-pushed
the
webrequest-rework
branch
from
June 26, 2024 10:24
11107df to
09575cd
Compare
ckerr
approved these changes
Jul 2, 2024
|
Release Notes Persisted
|
This was referenced Jul 2, 2024
Contributor
|
I have automatically backported this PR to "32-x-y", please check out #42750 |
Contributor
|
I have automatically backported this PR to "31-x-y", please check out #42751 |
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Closes #42149.
Fixes an issue where Chromium could crash on a dangling unretained pointer in one of several webRequest functions. This was happening as a result of the fact that we had outstanding blocking requests continue to reference state owned by
ProxyingWebsocketandProxyingURLLoaderFactoryafter the requests were destroyed.This had been going on for a few years, and was likely leading to some ongoing memory issues. To fix this, we need to ensure that all state is cleaned up in
OnRequestWillBeDestroyed. I chose to create a new BlockedRequest struct to do so, which approximates the approach that upstream takes. The complexities of doing so also made our templated approach more trouble than it felt worth, so i pried that apart into separate handlers.h/t @ckerr for talking lots of this through with me 🙇🏻♀️
Checklist
npm testpassesRelease Notes
Notes: Fixes an issue where Chromium could crash on a dangling unretained pointer in one of several webRequest functions