Unzip initialization lists and constructors in JSCell hierarchy (5/7)
[WebKit-https.git] / Source / JavaScriptCore / API / JSCallbackFunction.cpp
index 3cceb0b..64d513e 100644 (file)
@@ -43,9 +43,16 @@ ASSERT_CLASS_FITS_IN_CELL(JSCallbackFunction);
 const ClassInfo JSCallbackFunction::s_info = { "CallbackFunction", &InternalFunction::s_info, 0, 0 };
 
 JSCallbackFunction::JSCallbackFunction(ExecState* exec, JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, const Identifier& name)
-    : InternalFunction(&exec->globalData(), globalObject, globalObject->callbackFunctionStructure(), name)
+    : InternalFunction(globalObject, globalObject->callbackFunctionStructure())
     , m_callback(callback)
 {
+    finishCreation(exec->globalData(), name);
+}
+
+void JSCallbackFunction::finishCreation(JSGlobalData& globalData, const Identifier& name)
+{
+    Base::finishCreation(globalData, name);
+    ASSERT(inherits(&s_info));
 }
 
 EncodedJSValue JSCallbackFunction::call(ExecState* exec)