-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tailored security] Store ref to window when sending scoped message
The TailoredSecurityConsentedModalAndroid class enqueues a window scoped message, but was keeping a reference to a WebContents in a callback. There were cases where the WebContents can be destroyed before the message is cleared from the message queue. When this would happen, Chrome would crash if the user was later shown the message and the user would click settings (which would run the callback). This change addresses the problem by keeping a reference to the window that the message is scoped to and adding APIs that support being passed a window. The lifetime of the window will exceed the lifetime of the message, so the callback should now be able to run without crashing. Change-Id: I81f1174edd08c537054fbd29134d4c0d7a108613 Bug: 1445443 Low-Coverage-Reason: consented_message_android.cc is covered, but android native tests aren't reported by the low-coverage-check tool. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4617345 Reviewed-by: Mustafa Emre Acer <meacer@chromium.org> Commit-Queue: Javier Castro <jacastro@chromium.org> Reviewed-by: Xinghui Lu <xinghuilu@chromium.org> Cr-Commit-Position: refs/heads/main@{#1159197}
- Loading branch information
Javier Castro
authored and
Chromium LUCI CQ
committed
Jun 17, 2023
1 parent
0fc8e90
commit 04793ab
Showing
8 changed files
with
26 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters