Lines Matching defs:instance
108 static void CreateEcmaVMWithScope(EcmaVM *&instance, JSThread *&thread, EcmaHandleScope *&scope,
119 instance = JSNApi::CreateEcmaVM(options);
120 instance->SetEnableForceGC(true);
121 ASSERT_TRUE(instance != nullptr) << "Cannot create EcmaVM";
122 thread = instance->GetJSThread();
129 static inline void DestroyEcmaVMWithScope(EcmaVM *instance, EcmaHandleScope *scope, bool exitManagedCode = true)
134 instance->GetJSThread()->ManagedCodeEnd();
136 instance->SetEnableForceGC(false);
137 JSNApi::DestroyJSVM(instance);
188 TestHelper::CreateEcmaVMWithScope(instance, thread, scope);
196 instance = JSNApi::CreateEcmaVM(options);
197 instance->SetEnableForceGC(true);
198 ASSERT_TRUE(instance != nullptr) << "Cannot create EcmaVM";
199 thread = instance->GetJSThread();
207 TestHelper::DestroyEcmaVMWithScope(instance, scope);
210 EcmaVM *instance {nullptr};