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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java

Issue 1109833002: Log an error, when insertVisualStateCallback is called on a destroyed WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java b/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
index de5dfb13f9d75ff1a419499064c25553b2b4ea0c..ec722f61372f5a2262e32a713e3ac8c725235a1a 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
@@ -68,14 +68,15 @@ public class AwWebContentsObserver extends WebContentsObserver {
public void run() {
AwContents awContents = mAwContents.get();
if (awContents != null) {
- awContents.insertVisualStateCallback(0, new VisualStateCallback() {
- @Override
- public void onComplete(long requestId) {
- AwContentsClient client = mAwContentsClient.get();
- if (client == null) return;
- client.onPageCommitVisible(url);
- }
- });
+ awContents.insertVisualStateCallbackIfNotDestroyed(
+ 0, new VisualStateCallback() {
+ @Override
+ public void onComplete(long requestId) {
+ AwContentsClient client = mAwContentsClient.get();
+ if (client == null) return;
+ client.onPageCommitVisible(url);
+ }
+ });
}
}
});
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698