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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java

Issue 1894623002: No-op when trying to evaluate null string. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
index 48a7e1d0f0e95cb23b7e6b23a7dc9868fa9d680a..db674c15da55eb90320af133c078964d821d5221 100644
--- a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
@@ -316,13 +316,14 @@ import java.util.UUID;
@Override
public void evaluateJavaScript(String script, JavaScriptCallback callback) {
- if (isDestroyed()) return;
+ if (isDestroyed() || script == null) return;
nativeEvaluateJavaScript(mNativeWebContentsAndroid, script, callback);
}
@Override
@VisibleForTesting
public void evaluateJavaScriptForTests(String script, JavaScriptCallback callback) {
+ if (script == null) return;
nativeEvaluateJavaScriptForTests(mNativeWebContentsAndroid, script, 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