[Webkit-unassigned] [Bug 57022] Add a new JavaValue to type to represent a Java value in the Java bridge

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 25 06:02:04 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=57022





--- Comment #4 from Andrei Popescu <andreip at google.com>  2011-03-25 06:02:05 PST ---
View in context: https://bugs.webkit.org/attachment.cgi?id=86916&action=review

> Source/WebCore/bridge/jni/JavaType.h:62
> +    // special JavaTypeString which will be converted to a Java String when we

I think you could make this comment a bit clearer by saying something like:

"We cannot make the assumption that, at conversion time, the type to convert to is a JNI type. This is because there may be some mechanism other than JNI for reaching back to Java. Instead, we use..."

> Source/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp:68
> +            if (type == NPVariantType_String)

should this be on the line above, next to the else?

> Source/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp:298
> +        result.l = getJNIEnv()->NewString(value.m_stringValue.characters(), value.m_stringValue.length());

Add a comment saying this is a local ref so it'll be released once the the executions returns back to Java from native? Also mention that probably this may leak if the call does not originate from java (e.g. from a worker, which may run its own native message loop).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list