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

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

Issue 974143002: Throw if webview has been destroyed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | 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/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index c95137c7ec63a5d061f50cf0c56f4f90399adf86..6e0a6b4d1c6ea9d3423a01165fb44ecbc829444d 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -2067,8 +2067,12 @@ public class AwContents implements SmartClipProvider,
* @param requestId an id that will be returned from the callback invocation to allow
* callers to match requests with callbacks.
* @param callback the callback to be inserted
+ * @throw IllegalStateException if this method is invoked after {@link #destroy()} has been
+ * called.
*/
public void insertVisualStateCallback(long requestId, VisualStateCallback callback) {
+ if (isDestroyed()) throw new IllegalStateException(
+ "insertVisualStateCallback cannot be called after the WebView has been destroyed");
nativeInsertVisualStateCallback(mNativeAwContents, requestId, callback);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698