[PaymentHandler] Avoid destroy FrameTreeNode in WebContents' methods
Context: In the expandable PaymentHandler UI, users who click on a http link in a payment app get a crash. The cause is that the WebContents' didFinishLoad callback destroy FrameTreeNode when http content is detected. Since the subsequent execution of WebContents still relies on FrameTreeNode, it causes a null pointer crash afterwards. Before change: users click on a http link in a payment app get a crash. After change: no crash in the same scenario any more. Change: when closing PH UI is needed in WebContentsObserver callbacks, postpone the closing until the main thread is free. Bug: 1044077 Change-Id: If574cb9b23f4ff6b176f49daa8fcb47b25572ad3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2013440 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#733761}
Showing
Please register or sign in to comment