Lines Matching full:instance
103 static void CreateEcmaVMWithScope(EcmaVM *&instance, JSThread *&thread, EcmaHandleScope *&scope,
111 instance = JSNApi::CreateEcmaVM(options);
112 instance->SetEnableForceGC(true);
113 ASSERT_TRUE(instance != nullptr) << "Cannot create EcmaVM";
114 thread = instance->GetJSThread();
116 auto globalEnv = instance->GetGlobalEnv();
117 methodFunction_ = instance->GetFactory()->NewJSFunction(globalEnv);
120 static inline void DestroyEcmaVMWithScope(EcmaVM *instance, EcmaHandleScope *scope) in DestroyEcmaVMWithScope() argument
124 instance->SetEnableForceGC(false); in DestroyEcmaVMWithScope()
125 auto thread = instance->GetJSThread(); in DestroyEcmaVMWithScope()
127 JSNApi::DestroyJSVM(instance); in DestroyEcmaVMWithScope()