JavaField, which is used by the Java bridge to represent a field of a Java class, uses JavaString for the return value of its name() method. JavaString is a utility class intended to convert from the JNI string type jstring to WTF::String and char*. There's no need for JavaField to expose this utility type in its API. Instead it should just expose WTF::String, using JavaString internally where appropriate. See also Bug 55765.
Note that V8 and JSC use different implementations of JavaField. This bug tracks fixing V8's implementation only.
Created attachment 87523 [details] Patch 1
LGTM > Source/WebCore/bridge/jni/v8/JavaClassV8.cpp:56 > } Why the { } ? > Source/WebCore/bridge/jni/v8/JavaFieldJobjectV8.h:45 > + virtual const char* typeClassName() const { return m_typeClassName.utf8(); } I wish we didn't have this inconsistency: one method returns a String, the next returns a char*...
Comment on attachment 87523 [details] Patch 1 rubber stamp cause of andreip's LGTM
> Why the { } ? Looks like an oversight from when this class was copied from the JSC version, which uses these brackets to scope a JSLock. Will remove on landing. > I wish we didn't have this inconsistency: one method returns a String, the next returns a char*... Agreed. Tracking in Bug 57443 and will fix.
Committed r82554: <http://trac.webkit.org/changeset/82554>