[ExpandablePaymentHandler] Remove posted tasks of PH Mediator on hidden
Context: PaymentHandlerMediator does not stop the posted tasks on PH hidden. In the example of the bug, PaymentHandlerMediator has found the page to be insecure in several WebContents observer hooks. Each of them posts a hide() task. When several of such task is posted, the first task would release WebContents; the subsequent tasks who tries to access WebContents would trigger the crash. Before Change: Clank would crash when users clicking an http link in a payment app. After Change: No crash happens. Change: * In ServiceWorkerPaymentAppBridge, whenever it tries to access WebContents, check whether if it has been destroyed. * PaymentHandlerMediator stops the pending posted tasks on PH hidden. * (side) fix CCT PH UI for always closing on open. Bug: 1049262 Change-Id: I9f849854c48e92e06ada1348a80d761a0b4db744 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2039995 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#738713}
Showing
Please register or sign in to comment