int CFXJS_Engine::DefineObj(const wchar_t* sObjName, FXJSOBJTYPE eObjType, CFXJS_Engine::Constructor pConstructor, CFXJS_Engine::Destructor pDestructor) { v8::Isolate::Scope isolate_scope(m_isolate); v8::HandleScope handle_scope(m_isolate); FXJS_PerIsolateData::SetUp(m_isolate); CFXJS_ObjDefinition* pObjDef = new CFXJS_ObjDefinition( m_isolate, sObjName, eObjType, pConstructor, pDestructor); return pObjDef->AssignID(); }
int FXJS_DefineObj(v8::Isolate* pIsolate, const wchar_t* sObjName, FXJSOBJTYPE eObjType, FXJS_CONSTRUCTOR pConstructor, FXJS_DESTRUCTOR pDestructor) { v8::Isolate::Scope isolate_scope(pIsolate); v8::HandleScope handle_scope(pIsolate); FXJS_PerIsolateData::SetUp(pIsolate); CFXJS_ObjDefinition* pObjDef = new CFXJS_ObjDefinition( pIsolate, sObjName, eObjType, pConstructor, pDestructor); return pObjDef->AssignID(); }