[PaymentHandler] Delay hider to avoid destroying WebContents in itself
Context: the Bottom-sheet Payment Handler UI observes the load finish of the WebContents. Upon observing that, the UI check the validity of the page of the payment handler app, and if invalid, close the page. Old behavior: closing the invalid payment handler crashes. Cause: because the load finish hook is called within WebContents, when the hook tries to destroy WebContents itself, it causes a crash. Change: defer destroying WebContents until WebContents is not being used. New behavior: Payment Handler UI destroys WebContents outside of the observer hook. So the crash is fixed. Bug: 1029995 Change-Id: I7968daaad793a949808fc30e6f08b03bb19c330f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949057Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Cr-Commit-Position: refs/heads/master@{#721542}
Showing
Please register or sign in to comment