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

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

Issue 2778193003: Don't access destroyed web contents. (Closed)
Patch Set: Created 3 years, 9 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/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.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/ChromeActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
index 45aa193db6f5fc855533a9a99b0cc52b4f69cdb4..62c634a558f9674ab36f7cf707b6a534a478a350 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -2099,6 +2099,8 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
@Nullable public static ChromeActivity fromWebContents(@Nullable WebContents webContents) {
if (webContents == null) return null;
+ if (webContents.isDestroyed()) return null;
+
WindowAndroid window = webContents.getTopLevelNativeWindow();
if (window == null) return null;
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698