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 046ccfccecb9e2b2281b33dc4b7e558345fc8cc6..4ddd359936de48507a4df36bdc2e179d2fc8d115 100644 |
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java |
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java |
@@ -1347,6 +1347,14 @@ public class AwContents implements SmartClipProvider, |
ValueCallback<String[]> callback = new ValueCallback<String[]>() { |
@Override |
public void onReceiveValue(final String[] value) { |
+ if (value != null) { |
+ // Replace null values with empty strings, because they can't be represented as |
+ // native strings. |
+ for (int i = 0; i < value.length; i++) { |
+ if (value[i] == null) value[i] = ""; |
+ } |
+ } |
+ |
ThreadUtils.runOnUiThread(new Runnable() { |
@Override |
public void run() { |