Revert "[Payment Request] Fixed potential use-after-free of RenderFrameHost."
This reverts commit 7f5e20cc. Reason for revert: caused a new crash: crbug.com/1063048 Original change's description: > [Payment Request] Fixed potential use-after-free of RenderFrameHost. > > InstallablePaymentAppCrawler stores a RenderFrameHost raw pointer and > uses it in asynchronously when DownloadAndDecodeWebAppIcon() is run as > a callback for downloading the web app manifest. This creates a possible > use-after-free situation. > > This CL applies a limited fix: the RenderFrameHost* is converted to its > GlobalFrameRoutingId to be stored inside InstallablePaymentAppCrawler. > > A better fix is to use WeakPtr<RenderFrameHost> everywhere in payments > code. However, this requires changing the content public API to expose > a RenderFrameHost::GetWeakPtr() method. Since this CL is intended to be > merged to M82, this more risky work is left as a followup for > crbug.com/1058840. > > The instantiation of InstallablePaymentAppCrawler happens synchronously > with the instantiation of PaymentRequest, the risk of use-after-free as > a result of PaymentRequest's storage of RenderFrameHost* is small. > > Bug: 1061110 > Change-Id: I1428c6006201834ee341dd4546bd297116a5f380 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2106387 > Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org> > Commit-Queue: Danyao Wang <danyao@chromium.org> > Cr-Commit-Position: refs/heads/master@{#751454} TBR=rouslan@chromium.org,danyao@chromium.org Change-Id: Iacb8ff851af05e01503630d671547f8d19dda05c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 1061110 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2109828Reviewed-by:Danyao Wang <danyao@chromium.org> Commit-Queue: Danyao Wang <danyao@chromium.org> Cr-Commit-Position: refs/heads/master@{#751709}
Showing
Please register or sign in to comment