Unzip initialization lists and constructors in JSCell hierarchy (6/7)
[WebKit-https.git] / Source / WebCore / bridge / jni / jsc / JavaRuntimeObject.h
index 8fa452e..ebedd76 100644 (file)
@@ -38,12 +38,14 @@ class JavaRuntimeObject : public RuntimeObject {
 public:
     typedef RuntimeObject Base;
 
-    static JavaRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<JavaInstance> javaInst)
+    static JavaRuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<JavaInstance> javaInstance)
     {
         // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
         // We need to pass in the right global object for "i".
         Structure* domStructure = WebCore::deprecatedGetDOMStructure<JavaRuntimeObject>(exec);
-        return new (allocateCell<JavaRuntimeObject>(*exec->heap())) JavaRuntimeObject(exec, globalObject, domStructure, javaInst);
+        JavaRuntimeObject* object = new (allocateCell<JavaRuntimeObject>(*exec->heap())) JavaRuntimeObject(exec, globalObject, domStructure, javaInstance);
+        object->finishCreation(globalObject);
+        return object;
     }
 
     virtual ~JavaRuntimeObject();