diff options
author | Steve Block <steveblock@google.com> | 2011-06-07 15:53:15 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-06-08 14:50:18 +0100 |
commit | 9c8e65377a8462e90abc85e3d888365f7fecf9e3 (patch) | |
tree | 0703324b9dabcd8866feac66705cc142c1ec18aa /Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp | |
parent | 5461f2587f09db45fac0a6f6e1b9c62f638aebc0 (diff) | |
download | external_webkit-9c8e65377a8462e90abc85e3d888365f7fecf9e3.zip external_webkit-9c8e65377a8462e90abc85e3d888365f7fecf9e3.tar.gz external_webkit-9c8e65377a8462e90abc85e3d888365f7fecf9e3.tar.bz2 |
Merge WebKit at r82507: Fix conflicts due to JNI refactoring
- JavaNPObjectV8.cpp
Due to new JavaInstance::getField()
http://trac.webkit.org/changeset/80653
- JNIUtilityPrivate.cpp
- Android has a number of local modifications to convert numeric
NPVariant values to a JNI jstring, using toString() via JNI.
However, after the upstream refactoring, we no longer convert
NPVariant directly to jvalue. Instead, we go via a new JavaValue
type, which represents strings as JavaTypeString using
WTF::String.
This patch updates the Android modifications to set the JavaValue
using WTF::String methods, without using JNI. Note that the spec
for these conversions - http://jdk6.java.net/plugin2/liveconnect -
does not require the use of toString(), so this is OK.
- Android also adds handling for converting arrays from NPVariant to
jvalue. However, the intermediate JavaValue type does not yet have
support for arrays. We get around this with an ugly hack, where we
continue to create a jarray and set this as the object field of
the JavaValue. When converting from a JavaValue to a jvalue, we
add handling for arrays.
http://trac.webkit.org/changeset/82194
Diffstat (limited to 'Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp')
-rw-r--r-- | Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp b/Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp index b02d059..b86a090 100644 --- a/Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp +++ b/Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp @@ -184,24 +184,16 @@ bool JavaNPObjectGetProperty(NPObject* obj, NPIdentifier identifier, NPVariant* if (!field) return false; -<<<<<<< HEAD #if PLATFORM(ANDROID) // JSC does not seem to support returning object properties so we emulate that // behaviour here. - jvalue value; + JavaValue value; #else - jvalue value = getJNIField(instance->javaInstance(), - field->getJNIType(), - field->name().utf8(), - field->type()); -#endif // PLATFORM(ANDROID) - convertJValueToNPVariant(value, field->getJNIType(), field->type(), result); -======= JavaValue value = instance->getField(field); +#endif // PLATFORM(ANDROID) instance->end(); convertJavaValueToNPVariant(value, result); ->>>>>>> webkit.org at r82507 return true; } |