RESOLVED FIXED 57019
JavaInstance should not use jvalue in its API
https://bugs.webkit.org/show_bug.cgi?id=57019
Summary JavaInstance should not use jvalue in its API
Steve Block
Reported Thursday, March 24, 2011 4:47:39 PM UTC
The JavaInstance API should represent a generic Java object and should be independent of JNI, to give embedders flexibility in how a Java object is provided. This means that the API should use a new JavaValue type to represent a Java value, rather than the JNI jvalue type.
Attachments
Patch (6.07 KB, patch)
2011-03-29 04:12 PDT, Steve Block
no flags
Patch (6.36 KB, patch)
2011-03-29 15:06 PDT, Steve Block
no flags
Steve Block
Comment 1 Thursday, March 24, 2011 4:48:30 PM UTC
Steve Block
Comment 2 Tuesday, March 29, 2011 9:19:03 AM UTC
This bug tracks fixing only the V8 version of JavaInstance. The JSC version can not be fixed until Bug 57023 is fixed.
Steve Block
Comment 3 Tuesday, March 29, 2011 12:12:53 PM UTC
Andrei Popescu
Comment 4 Tuesday, March 29, 2011 7:31:12 PM UTC
LGTM View in context: https://bugs.webkit.org/attachment.cgi?id=87296&action=review > Source/WebCore/bridge/jni/v8/JavaInstanceV8.cpp:76 > + jvalue* jvalueArgs = new jvalue[numParams]; Is there a scoped_pointer for arrays? > Source/WebCore/bridge/jni/v8/JavaInstanceV8.cpp:78 > + jvalueArgs[i] = javaValueToJvalue(args[i]); Maybe add a comment to say that args is guaranteed to have at least numParams elements.
Steve Block
Comment 5 Tuesday, March 29, 2011 11:03:56 PM UTC
> Is there a scoped_pointer for arrays? Yes - OwnArrayPtr - fixed. > Maybe add a comment to say that args is guaranteed to have at least numParams elements. I've added a comment in the header. Note that this is not a new requirement, as previously the array was passed straight through to callJNIMethod().
Steve Block
Comment 6 Tuesday, March 29, 2011 11:06:50 PM UTC
Jeremy Orlow
Comment 7 Tuesday, March 29, 2011 11:10:26 PM UTC
Comment on attachment 87413 [details] Patch r+ based on Andrei's review
WebKit Commit Bot
Comment 8 Wednesday, March 30, 2011 12:47:03 AM UTC
Comment on attachment 87413 [details] Patch Clearing flags on attachment: 87413 Committed r82361: <http://trac.webkit.org/changeset/82361>
WebKit Commit Bot
Comment 9 Wednesday, March 30, 2011 12:47:07 AM UTC
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.