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.
Created attachment 88047 [details] Patch 1
> 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?
> Can we use an initialization list instead? Done > Use an OwnPtr? Done
Created attachment 88249 [details] Patch 2
LGTM
Comment on attachment 88249 [details] Patch 2 rs=me.
Committed r82950: <http://trac.webkit.org/changeset/82950>