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
fix: crash when doing redirect navigation with webRequest listener #21838
Conversation
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.
LGTM
@@ -538,8 +541,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::ContinueToBeforeRedirect( | |||
|
|||
factory_->web_request_api()->OnBeforeRedirect(&info_.value(), request_, | |||
redirect_info.new_url); | |||
target_client_->OnReceiveRedirect(redirect_info, | |||
std::move(current_response_)); | |||
target_client_->OnReceiveRedirect(redirect_info, current_response_.Clone()); |
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.
Should we also clone the response in target_client_->OnReceiveResponse
?
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.
Yeah it should also be changed, thanks for noticing this.
c27c086
to
2f1e71f
Compare
Release Notes Persisted
|
Description of Change
Close #21597.
This PR contains 2 fixes:
navigation_ui_data
.current_response_
being moved instead of cloned. This is caused by Chromium changing the behavior of their API without changing the signature.Checklist
npm test
passesRelease Notes
Notes: Fix crash when doing redirect navigation with
webRequest
listener.