Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5294)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java

Issue 2158843003: customtabs: Don't crash when the death notificaton is sent to a random thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
index aadaeaab074bae9b4598fec587e722b83028b530..a8df5211de0d040a2abf091b6cd20d2de820fde3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
@@ -653,8 +653,14 @@ public class CustomTabsConnection {
* Handle any clean up left after a session is destroyed.
* @param session The session that has been destroyed.
*/
- void cleanUpSession(CustomTabsSessionToken session) {
- mClientManager.cleanupSession(session);
+ @VisibleForTesting
+ void cleanUpSession(final CustomTabsSessionToken session) {
+ ThreadUtils.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ mClientManager.cleanupSession(session);
+ }
+ });
}
private boolean mayPrerender(CustomTabsSessionToken session) {
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698