summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-12-01 14:38:53 +0000
committerBen Murdoch <benm@google.com>2010-12-01 15:35:29 +0000
commit0e2d7e7412a32a141274e8a47048d00058bb1d5c (patch)
treef9ecdc6cfba0b687784d5b203a2884c7ee939cc2 /WebKit/android/jni/WebViewCore.cpp
parentbb5719a9c1b5209cf088271b9fed946fef01edb5 (diff)
downloadexternal_webkit-0e2d7e7412a32a141274e8a47048d00058bb1d5c.zip
external_webkit-0e2d7e7412a32a141274e8a47048d00058bb1d5c.tar.gz
external_webkit-0e2d7e7412a32a141274e8a47048d00058bb1d5c.tar.bz2
WtfStringToJString should be able to return a valid string on empty input
It is sometimes desirable to return a valid but 0-length string created from a 0-length WTF string but currently the WtfStringToJString function will always return a null jstring on an empty input. Add a parameter to specify that it should return an empty jstring on empty WTF string and default it to false. Change-Id: Ia449f1f9ae9b37c3da7d0272424e4fd4878ceb31
Diffstat (limited to 'WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 9099bb6..82ec3e2 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -2559,7 +2559,7 @@ void WebViewCore::openFileChooser(PassRefPtr<WebCore::FileChooser> chooser) {
JNIEnv* env = JSC::Bindings::getJNIEnv();
WTF::String acceptType = chooser->acceptTypes();
- jstring jAcceptType = WtfStringToJstring(env, acceptType);
+ jstring jAcceptType = WtfStringToJstring(env, acceptType, true);
jstring jName = (jstring) env->CallObjectMethod(
m_javaGlue->object(env).get(), m_javaGlue->m_openFileChooser, jAcceptType);
checkException(env);