Commit b2b11fde authored by boliu's avatar boliu Committed by Commit bot

Throw if webview has been destroyed

New APIs can be more strict about enforcing not being called after
destroy.

BUG=457184

Review URL: https://codereview.chromium.org/974143002

Cr-Commit-Position: refs/heads/master@{#319093}
parent a4468299
......@@ -2090,8 +2090,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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment