RESOLVED FIXED 55383
JavaInstance should be a pure interface
https://bugs.webkit.org/show_bug.cgi?id=55383
Summary JavaInstance should be a pure interface
Steve Block
Reported 2011-02-28 08:51:58 PST
The Java bridge code in WebCore/bridge/jni uses JavaInstance to represent a Java object which can be injected into JavaScript. The binding to JavaScript is done via NPAPI so objects of type JavaInstance are manipulated via JavaNPObject. The implementation of JavaInstance is a simple wrapper around a JNI jobject. To allow implementations flexibility in how the binding to a Java object is achieved, JavaInstance should be an interface. The current JavaInstance implementation would be moved to a new JavaInstanceJobject class which implements this interface.
Attachments
Patch 1 (15.75 KB, patch)
2011-04-04 04:12 PDT, Steve Block
no flags
Patch 2 (15.68 KB, patch)
2011-04-05 09:16 PDT, Steve Block
dglazkov: review+
Steve Block
Comment 1 2011-04-04 04:12:21 PDT
Created attachment 88047 [details] Patch 1
Andrei Popescu
Comment 2 2011-04-05 08:47:40 PDT
> Source/WebCore/bridge/jni/v8/JavaInstanceJobjectV8.cpp:45 > + m_class = 0; Can we use an initialization list instead? > Source/WebCore/bridge/jni/v8/JavaInstanceJobjectV8.cpp:51 > + delete m_class; Use an OwnPtr?
Steve Block
Comment 3 2011-04-05 09:15:53 PDT
> Can we use an initialization list instead? Done > Use an OwnPtr? Done
Steve Block
Comment 4 2011-04-05 09:16:16 PDT
Created attachment 88249 [details] Patch 2
Andrei Popescu
Comment 5 2011-04-05 09:23:55 PDT
LGTM
Dimitri Glazkov (Google)
Comment 6 2011-04-05 09:44:53 PDT
Comment on attachment 88249 [details] Patch 2 rs=me.
Steve Block
Comment 7 2011-04-05 10:12:16 PDT
Note You need to log in before you can comment on or make changes to this bug.