| /arkcompiler/ets_runtime/ecmascript/napi/include/ |
| D | jsnapi_expo.h | 115 using TimerTaskCallback = void* (*)(EcmaVM *vm, void *data, TimerCallbackFunc func, uint64_t timeou… 260 Local(const EcmaVM *vm, const Global<T> ¤t); 262 Local(const EcmaVM *vm, const CopyableGlobal<T> ¤t); 346 CopyableGlobal(const EcmaVM *vm, const Local<S> ¤t); 348 CopyableGlobal(const EcmaVM *vm, const Local<T> ¤t); 444 Global(const EcmaVM *vm, const Local<S> ¤t); 446 Global(const EcmaVM *vm, const Global<S> ¤t); 458 Local<T> ToLocal(const EcmaVM *vm) const in ToLocal() argument 460 return Local<T>(vm, *this); in ToLocal() 512 static Local<PrimitiveRef> Undefined(const EcmaVM *vm); [all …]
|
| D | dfx_jsnapi.h | 58 const EcmaVM *vm; member 65 …// isVmMode means the internal class in vm is visible. isPrivate means the number and string is no… 66 …static void DumpHeapSnapshot(const EcmaVM *vm, const std::string &path, const DumpSnapShotOption &… 67 static void DumpHeapSnapshot(const EcmaVM *vm, int& fd, const DumpSnapShotOption &dumpOption, 69 …static void DumpHeapSnapshot(const EcmaVM *vm, Stream *stream, const DumpSnapShotOption &dumpOptio… 72 static void DumpCpuProfile(const EcmaVM *vm); 73 static void DumpHeapSnapshot(const EcmaVM *vm, const DumpSnapShotOption &dumpOption); 74 …static void DumpHeapSnapshot(const EcmaVM *vm, const DumpSnapShotOption &dumpOption, uint32_t tid); 75 …static void GenerateHeapSnapshotByBinFile(const EcmaVM *vm, std::string &inputFilePath, std::strin… 76 …static void DumpHeapSnapshotWithVm(const EcmaVM *vm, const DumpSnapShotOption &dumpOption, uint32_… [all …]
|
| /arkcompiler/toolchain/tooling/backend/ |
| D | debugger_executor.cpp | 22 void DebuggerExecutor::Initialize(const EcmaVM *vm) in Initialize() argument 24 [[maybe_unused]] EcmaHandleScope handleScope(vm->GetJSThread()); in Initialize() 25 Local<ObjectRef> globalObj = JSNApi::GetGlobalObject(vm); in Initialize() 26 globalObj->Set(vm, StringRef::NewFromUtf8(vm, "debuggerSetValue"), FunctionRef::New( in Initialize() 27 const_cast<panda::EcmaVM*>(vm), DebuggerExecutor::DebuggerSetValue)); in Initialize() 28 globalObj->Set(vm, StringRef::NewFromUtf8(vm, "debuggerGetValue"), FunctionRef::New( in Initialize() 29 const_cast<panda::EcmaVM*>(vm), DebuggerExecutor::DebuggerGetValue)); in Initialize() 34 EcmaVM *vm = runtimeCallInfo->GetVM(); in DebuggerGetValue() local 37 return JSValueRef::Undefined(vm); in DebuggerGetValue() 40 if (!name->IsString(vm)) { in DebuggerGetValue() [all …]
|
| /arkcompiler/toolchain/tooling/ |
| D | debugger_service.cpp | 23 void InitializeDebugger(::panda::ecmascript::EcmaVM *vm, in InitializeDebugger() argument 26 if (vm == nullptr || vm->GetJsDebuggerManager() == nullptr) { in InitializeDebugger() 27 LOG_DEBUGGER(DEBUG) << "VM has already been destroyed"; in InitializeDebugger() 30 ProtocolHandler *handler = vm->GetJsDebuggerManager()->GetDebuggerHandler(); in InitializeDebugger() 35 vm->GetJsDebuggerManager()->SetDebuggerHandler(new ProtocolHandler(onResponse, vm)); in InitializeDebugger() 38 void UninitializeDebugger(::panda::ecmascript::EcmaVM *vm) in UninitializeDebugger() argument 40 if (vm == nullptr || vm->GetJsDebuggerManager() == nullptr) { in UninitializeDebugger() 41 LOG_DEBUGGER(DEBUG) << "VM has already been destroyed"; in UninitializeDebugger() 44 ProtocolHandler *handler = vm->GetJsDebuggerManager()->GetDebuggerHandler(); in UninitializeDebugger() 46 vm->GetJsDebuggerManager()->SetDebuggerHandler(nullptr); in UninitializeDebugger() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/js_vm/ |
| D | main.cpp | 46 bool IsEqual(EcmaVM *vm, Local<JSValueRef> jsArg0, Local<JSValueRef> jsArg1) in IsEqual() argument 48 if (jsArg0->IsStrictEquals(vm, jsArg1)) { in IsEqual() 50 } else if ((jsArg0->IsJSArray(vm) && jsArg1->IsJSArray(vm))) { in IsEqual() 53 uint32_t length = arr0->Length(vm); in IsEqual() 54 if (length != arr1->Length(vm)) { in IsEqual() 58 Local<JSValueRef> arg0 = ArrayRef::GetValueAt(vm, arr0, i); in IsEqual() 59 Local<JSValueRef> arg1 = ArrayRef::GetValueAt(vm, arr1, i); in IsEqual() 60 if (!IsEqual(vm, arg0, arg1)) { in IsEqual() 71 EcmaVM *vm = runtimeInfo->GetVM(); in TestEnd() local 73 return JSValueRef::Undefined(vm); in TestEnd() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/napi/ |
| D | dfx_jsnapi.cpp | 58 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] const std::str… in DumpHeapSnapshot() argument 63 DumpHeapSnapshot(vm, &stream, dumpOption); in DumpHeapSnapshot() 69 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] int& fd, in DumpHeapSnapshot() argument 76 DumpHeapSnapshot(vm, &stream, dumpOption, nullptr, callback); in DumpHeapSnapshot() 83 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] Stream *stream, in DumpHeapSnapshot() argument 90 const_cast<EcmaVM *>(vm)); in DumpHeapSnapshot() 114 void DFXJSNApi::DumpCpuProfile([[maybe_unused]] const EcmaVM *vm) in DumpCpuProfile() argument 117 vm->GetJSThread()->GetCurrentEcmaContext()->PrintMegaICStat(); in DumpCpuProfile() 123 if (DFXJSNApi::StopCpuProfilerForColdStart(vm)) { in DumpCpuProfile() 128 if (DFXJSNApi::CpuProfilerSamplingAnyTime(vm)) { in DumpCpuProfile() [all …]
|
| D | jsnapi_expo.cpp | 205 Local<PrimitiveRef> JSValueRef::Undefined(const EcmaVM *vm) in Undefined() argument 208 vm->GetJSThread()->GlobalConstants()->GetHandledUndefined()); in Undefined() 211 Local<PrimitiveRef> JSValueRef::Null(const EcmaVM *vm) in Null() argument 214 vm->GetJSThread()->GlobalConstants()->GetHandledNull()); in Null() 217 Local<PrimitiveRef> JSValueRef::Hole(const EcmaVM *vm) in Hole() argument 220 vm->GetJSThread()->GlobalConstants()->GetHandledHole()); in Hole() 223 Local<PrimitiveRef> JSValueRef::True(const EcmaVM *vm) in True() argument 226 vm->GetJSThread()->GlobalConstants()->GetHandledTrue()); in True() 229 Local<PrimitiveRef> JSValueRef::False(const EcmaVM *vm) in False() argument 232 vm->GetJSThread()->GlobalConstants()->GetHandledFalse()); in False() [all …]
|
| D | jsnapi.cpp | 47 … bool StartDebug(const std::string& componentName, void* vm, bool isDebugMode, int32_t instanceId, 49 void StopDebug(void* vm); 50 void WaitForDebugger(void* vm); 147 …const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset, int32_t length) \ 149 …CROSS_THREAD_AND_EXCEPTION_CHECK_WITH_RETURN(vm, JSValueRef::Undefined(vm)); \ 150 …ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); \ 151 …JSHandle<GlobalEnv> env = vm->GetGlobalEnv(); \ 159 …RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm)); \ 162 …RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm)); \ 173 …const EcmaVM *vm, Local<SendableArrayBufferRef> buffer, int32_t byteOffset, int32_t length) \ [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluerefismodulenamespace_fuzzer/ |
| D | jsvaluerefismodulenamespace_fuzzer.cpp | 40 EcmaVM *vm = JSNApi::CreateJSVM(option); in IsModuleNamespaceObjectFuzztest() local 42 JsiFastNativeScope scope(vm); in IsModuleNamespaceObjectFuzztest() 47 ObjectFactory *objectFactory = vm->GetFactory(); in IsModuleNamespaceObjectFuzztest() 50 …SourceTextModule::AddLocalExportEntry(vm->GetJSThread(), module, localExportEntry1, 0, ERROR_TYPE_… in IsModuleNamespaceObjectFuzztest() 52 …SourceTextModule::AddLocalExportEntry(vm->GetJSThread(), module, localExportEntry2, 1, ERROR_TYPE_… in IsModuleNamespaceObjectFuzztest() 53 … JSHandle<TaggedArray> localExportEntries(vm->GetJSThread(), module->GetLocalExportEntries()); in IsModuleNamespaceObjectFuzztest() 56 … ModuleManager *moduleManager = vm->GetJSThread()->GetCurrentEcmaContext()->GetModuleManager(); in IsModuleNamespaceObjectFuzztest() 58 JSHandle<ModuleNamespace> np = ModuleNamespace::ModuleNamespaceCreate(vm->GetJSThread(), in IsModuleNamespaceObjectFuzztest() 63 moduleNamespace->IsModuleNamespaceObject(vm); in IsModuleNamespaceObjectFuzztest() 65 JSNApi::DestroyJSVM(vm); in IsModuleNamespaceObjectFuzztest() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/napi/test/ |
| D | jsnapi_sample.cpp | 386 static std::vector<Local<SymbolRef>> GetSymbolRef(EcmaVM *vm) in GetSymbolRef() argument 389 …static std::vector<Local<SymbolRef>> value = { SymbolRef::New(vm, StringRef::NewFromUtf8(vm, "symb… in GetSymbolRef() 390 … SymbolRef::New(vm, StringRef::NewFromUtf8(vm, "symbolKey2")), in GetSymbolRef() 391 … SymbolRef::New(vm, StringRef::NewFromUtf8(vm, "symbolKey3")) }; in GetSymbolRef() 479 void ObjectRefSet(Local<ObjectRef> object, EcmaVM *vm, Local<SymbolRef> symbol) in ObjectRefSet() argument 483 bool b = object->Set(vm, cnt, StringRef::NewFromUtf8(vm, "TestValue1")); in ObjectRefSet() 485 …b = object->Set(vm, StringRef::NewFromUtf8(vm, "Test2"), StringRef::NewFromUtf8(vm, "TestValue2")); in ObjectRefSet() 487 …b = object->Set(vm, StringRef::NewFromUtf8(vm, "Test3"), StringRef::NewFromUtf8(vm, "TestValue3")); in ObjectRefSet() 489 b = object->Set(vm, symbol, StringRef::NewFromUtf8(vm, "symbolValue")); in ObjectRefSet() 492 Local<FunctionRef> getter1 = FunctionRef::New(vm, Getter1); in ObjectRefSet() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluereffoundationvalue_fuzzer/ |
| D | jsvaluereffoundationvalue_fuzzer.cpp | 31 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsNumberValueFuzzTest() local 45 Local<IntegerRef> intValue = IntegerRef::New(vm, key); in JSValueRefIsNumberValueFuzzTest() 50 Local<NumberRef> resUnit32 = NumberRef::New(vm, inputUnit32); in JSValueRefIsNumberValueFuzzTest() 55 Local<BooleanRef> resBool = BooleanRef::New(vm, inputBool); in JSValueRefIsNumberValueFuzzTest() 56 Local<StringRef> stringUtf8 = StringRef::NewFromUtf8(vm, (char *)data, (int)size); in JSValueRefIsNumberValueFuzzTest() 61 JSNApi::DestroyJSVM(vm); in JSValueRefIsNumberValueFuzzTest() 68 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsStringValueFuzzTest() local 73 Local<JSValueRef> tag = StringRef::NewFromUtf8(vm, (char *)data, (int)size); in JSValueRefIsStringValueFuzzTest() 74 tag->IsString(vm); in JSValueRefIsStringValueFuzzTest() 75 JSNApi::DestroyJSVM(vm); in JSValueRefIsStringValueFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluerefobject_fuzzer/ |
| D | jsvaluerefobject_fuzzer.cpp | 32 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsSymbolFuzzTest() local 37 Local<StringRef> description = StringRef::NewFromUtf8(vm, (char*)data, size); in JSValueRefIsSymbolFuzzTest() 38 Local<SymbolRef> symbol = SymbolRef::New(vm, description); in JSValueRefIsSymbolFuzzTest() 39 symbol->IsSymbol(vm); in JSValueRefIsSymbolFuzzTest() 40 JSNApi::DestroyJSVM(vm); in JSValueRefIsSymbolFuzzTest() 47 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsBigIntFuzzTest() local 53 Local<IntegerRef> intValue = IntegerRef::New(vm, input); in JSValueRefIsBigIntFuzzTest() 54 [[maybe_unused]]bool res = intValue->IsBigInt(vm); in JSValueRefIsBigIntFuzzTest() 55 JSNApi::DestroyJSVM(vm); in JSValueRefIsBigIntFuzzTest() 62 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsObjectFuzzTest() local [all …]
|
| /arkcompiler/ets_runtime/ecmascript/builtins/ |
| D | builtins_lazy_callback.cpp | 26 EcmaVM *vm = thread->GetEcmaVM(); in Date() local 27 ObjectFactory *factory = vm->GetFactory(); in Date() 28 auto env = vm->GetGlobalEnv(); in Date() 32 Builtins builtin(thread, factory, vm); in Date() 41 EcmaVM *vm = thread->GetEcmaVM(); in Set() local 42 ObjectFactory *factory = vm->GetFactory(); in Set() 43 auto env = vm->GetGlobalEnv(); in Set() 46 Builtins builtin(thread, factory, vm); in Set() 56 EcmaVM *vm = thread->GetEcmaVM(); in Map() local 57 ObjectFactory *factory = vm->GetFactory(); in Map() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/publicapilocalregexpref_fuzzer/ |
| D | publicapilocalregexpref_fuzzer.cpp | 31 EcmaVM *vm = JSNApi::CreateJSVM(option); in LocalRegExpGetOriginalSourceFuzzTest() local 33 JsiFastNativeScope scope(vm); in LocalRegExpGetOriginalSourceFuzzTest() 38 JSThread *thread = vm->GetJSThread(); in LocalRegExpGetOriginalSourceFuzzTest() 39 ObjectFactory *factory = vm->GetFactory(); in LocalRegExpGetOriginalSourceFuzzTest() 51 object->GetOriginalSource(vm); in LocalRegExpGetOriginalSourceFuzzTest() 53 JSNApi::DestroyJSVM(vm); in LocalRegExpGetOriginalSourceFuzzTest() 60 EcmaVM *vm = JSNApi::CreateJSVM(option); in LocalRegExpRefGetOriginalFlagsFuzzTest() local 62 JsiFastNativeScope scope(vm); in LocalRegExpRefGetOriginalFlagsFuzzTest() 67 JSThread *thread = vm->GetJSThread(); in LocalRegExpRefGetOriginalFlagsFuzzTest() 68 ObjectFactory *factory = vm->GetFactory(); in LocalRegExpRefGetOriginalFlagsFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluerefisarray_fuzzer/ |
| D | jsvaluerefisarray_fuzzer.cpp | 28 EcmaVM *vm = JSNApi::CreateJSVM(option); in IsInt8ArrayFuzztest() local 34 …Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm, (void *)data, (int32_t)size, deleter, … in IsInt8ArrayFuzztest() 35 Local<JSValueRef> typedArray = Int8ArrayRef::New(vm, arrayBuffer, 0, (int32_t)size); in IsInt8ArrayFuzztest() 36 typedArray->IsInt8Array(vm); in IsInt8ArrayFuzztest() 37 JSNApi::DestroyJSVM(vm); in IsInt8ArrayFuzztest() 44 EcmaVM *vm = JSNApi::CreateJSVM(option); in IsUint8ArrayFuzztest() local 50 …Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm, (void *)data, (int32_t)size, deleter, … in IsUint8ArrayFuzztest() 51 Local<JSValueRef> typedArray = Uint8ArrayRef::New(vm, arrayBuffer, 0, (int32_t)size); in IsUint8ArrayFuzztest() 52 typedArray->IsUint8Array(vm); in IsUint8ArrayFuzztest() 53 JSNApi::DestroyJSVM(vm); in IsUint8ArrayFuzztest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/promiseref_fuzzer/ |
| D | promiseref_fuzzer.cpp | 29 EcmaVM *vm = JSNApi::CreateJSVM(option); in PromiseRefCatchFuzzTest() local 36 Local<PromiseCapabilityRef> capability = PromiseCapabilityRef::New(vm); in PromiseRefCatchFuzzTest() 37 Local<PromiseRef> promise = capability->GetPromise(vm); in PromiseRefCatchFuzzTest() 39 Local<FunctionRef> reject = FunctionRef::New(vm, RejectCallback); in PromiseRefCatchFuzzTest() 40 promise->Catch(vm, reject); in PromiseRefCatchFuzzTest() 41 JSNApi::DestroyJSVM(vm); in PromiseRefCatchFuzzTest() 49 EcmaVM *vm = JSNApi::CreateJSVM(option); in PromiseRefThenFinallyFuzzTest() local 56 Local<PromiseCapabilityRef> capability = PromiseCapabilityRef::New(vm); in PromiseRefThenFinallyFuzzTest() 57 Local<PromiseRef> promise = capability->GetPromise(vm); in PromiseRefThenFinallyFuzzTest() 59 Local<FunctionRef> reject = FunctionRef::New(vm, RejectCallback); in PromiseRefThenFinallyFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/objectbool_fuzzer/ |
| D | objectbool_fuzzer.cpp | 28 EcmaVM *vm = JSNApi::CreateJSVM(option); in ObjectBoolGetFuzzTest() local 33 Local<ObjectRef> object = ObjectRef::New(vm); in ObjectBoolGetFuzzTest() 34 Local<JSValueRef> key = StringRef::NewFromUtf8(vm, (char *)data, (int)size); in ObjectBoolGetFuzzTest() 35 object->Get(vm, key); in ObjectBoolGetFuzzTest() 36 JSNApi::DestroyJSVM(vm); in ObjectBoolGetFuzzTest() 43 EcmaVM *vm = JSNApi::CreateJSVM(option); in ObjectBoolHasFuzzTest() local 48 Local<ObjectRef> object = ObjectRef::New(vm); in ObjectBoolHasFuzzTest() 49 Local<JSValueRef> key = StringRef::NewFromUtf8(vm, (char *)data, (int)size); in ObjectBoolHasFuzzTest() 50 object->Has(vm, key); in ObjectBoolHasFuzzTest() 51 JSNApi::DestroyJSVM(vm); in ObjectBoolHasFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/bufferrefnew_fuzzer/ |
| D | bufferrefnew_fuzzer.cpp | 28 EcmaVM *vm = JSNApi::CreateJSVM(option); in BufferRefNewFuzzTest() local 33 BufferRef::New(vm, (int32_t)size); in BufferRefNewFuzzTest() 34 JSNApi::DestroyJSVM(vm); in BufferRefNewFuzzTest() 45 EcmaVM *vm = JSNApi::CreateJSVM(option); in BufferRefMultiParamNewFuzzTest() local 47 BufferRef::New(vm, (void *)data, (int32_t)size, deleter, (void *)data); in BufferRefMultiParamNewFuzzTest() 48 JSNApi::DestroyJSVM(vm); in BufferRefMultiParamNewFuzzTest() 55 EcmaVM *vm = JSNApi::CreateJSVM(option); in BufferRefByteLengthFuzzTest() local 60 Local<BufferRef> buffer = BufferRef::New(vm, (int32_t)size); in BufferRefByteLengthFuzzTest() 61 buffer->ByteLength(vm); in BufferRefByteLengthFuzzTest() 62 JSNApi::DestroyJSVM(vm); in BufferRefByteLengthFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/containerslinkedlistcommon_fuzzer/ |
| D | containerslinkedlistcommon_fuzzer.h | 111 EcmaVM *vm = JSNApi::CreateJSVM(option); in ContainersLinkedListAddFuzzTest() local 113 JsiFastNativeScope scope(vm); in ContainersLinkedListAddFuzzTest() 114 auto thread = vm->GetAssociatedJSThread(); in ContainersLinkedListAddFuzzTest() 129 JSNApi::DestroyJSVM(vm); in ContainersLinkedListAddFuzzTest() 136 EcmaVM *vm = JSNApi::CreateJSVM(option); in ContainersLinkedListGetFirstFuzzTest() local 138 JsiFastNativeScope scope(vm); in ContainersLinkedListGetFirstFuzzTest() 139 auto thread = vm->GetAssociatedJSThread(); in ContainersLinkedListGetFirstFuzzTest() 159 JSNApi::DestroyJSVM(vm); in ContainersLinkedListGetFirstFuzzTest() 166 EcmaVM *vm = JSNApi::CreateJSVM(option); in ContainersLinkedListGetLastFuzzTest() local 168 JsiFastNativeScope scope(vm); in ContainersLinkedListGetLastFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | ecma_string_table.cpp | 83 EcmaVM *vm = thread->GetEcmaVM(); in GetStringFromCompressedSubString() local 84 if (vm->IsCollectingScopeLockStats()) { in GetStringFromCompressedSubString() 85 vm->IncreaseStringTableLockCount(); in GetStringFromCompressedSubString() 103 EcmaVM *vm = thread->GetEcmaVM(); in GetString() local 104 if (vm->IsCollectingScopeLockStats()) { in GetString() 105 vm->IncreaseStringTableLockCount(); in GetString() 126 EcmaVM *vm = thread->GetEcmaVM(); in GetString() local 127 if (vm->IsCollectingScopeLockStats()) { in GetString() 128 vm->IncreaseStringTableLockCount(); in GetString() 148 EcmaVM *vm = thread->GetEcmaVM(); in GetString() local [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsnapiset_fuzzer/ |
| D | jsnapiset_fuzzer.cpp | 30 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSNApiSetAssetPathFuzzTest() local 35 JSNApi::SetAssetPath(vm, str); in JSNApiSetAssetPathFuzzTest() 36 JSNApi::DestroyJSVM(vm); in JSNApiSetAssetPathFuzzTest() 43 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSNApiSetBundleFuzzTest() local 50 JSNApi::SetBundle(vm, (bool)size); in JSNApiSetBundleFuzzTest() 51 JSNApi::DestroyJSVM(vm); in JSNApiSetBundleFuzzTest() 58 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSNApiSetHostEnqueueJobFuzzTest() local 63 Local<JSValueRef> key = StringRef::NewFromUtf8(vm, (char *)data, (int)size); in JSNApiSetHostEnqueueJobFuzzTest() 64 JSNApi::SetHostEnqueueJob(vm, key); in JSNApiSetHostEnqueueJobFuzzTest() 65 JSNApi::DestroyJSVM(vm); in JSNApiSetHostEnqueueJobFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/containersvectorcommon_fuzzer/ |
| D | containersvectorcommon_fuzzer.h | 115 EcmaVM *vm = JSNApi::CreateJSVM(option); in ContainersVectorAddFuzzTest() local 117 JsiFastNativeScope scope(vm); in ContainersVectorAddFuzzTest() 118 auto thread = vm->GetAssociatedJSThread(); in ContainersVectorAddFuzzTest() 131 JSNApi::DestroyJSVM(vm); in ContainersVectorAddFuzzTest() 138 EcmaVM *vm = JSNApi::CreateJSVM(option); in ContainersVectorGetFirstElementFuzzTest() local 140 JsiFastNativeScope scope(vm); in ContainersVectorGetFirstElementFuzzTest() 141 auto thread = vm->GetAssociatedJSThread(); in ContainersVectorGetFirstElementFuzzTest() 160 JSNApi::DestroyJSVM(vm); in ContainersVectorGetFirstElementFuzzTest() 167 EcmaVM *vm = JSNApi::CreateJSVM(option); in ContainersVectorGetIndexOfFuzzTest() local 169 JsiFastNativeScope scope(vm); in ContainersVectorGetIndexOfFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluerefiscontainer_fuzzer/ |
| D | jsvaluerefiscontainer_fuzzer.cpp | 40 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsVectorFuzzTest() local 42 JsiFastNativeScope scope(vm); in JSValueRefIsVectorFuzzTest() 46 JSThread *thread = vm->GetJSThread(); in JSValueRefIsVectorFuzzTest() 55 isVector->IsVector(vm); in JSValueRefIsVectorFuzzTest() 57 JSNApi::DestroyJSVM(vm); in JSValueRefIsVectorFuzzTest() 65 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsMapFuzzTest() local 69 Local<MapRef> map = MapRef::New(vm); in JSValueRefIsMapFuzzTest() 70 map->IsMap(vm); in JSValueRefIsMapFuzzTest() 71 JSNApi::DestroyJSVM(vm); in JSValueRefIsMapFuzzTest() 79 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsRegExpFuzzTest() local [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/objectgetinformation_fuzzer/ |
| D | objectgetinformation_fuzzer.cpp | 28 EcmaVM *vm = JSNApi::CreateJSVM(option); in ObjectGetAllPropertyNamesFuzzTest() local 51 Local<ObjectRef> object = ObjectRef::New(vm); in ObjectGetAllPropertyNamesFuzzTest() 53 object->SetNativePointerField(vm, index, (void *)data, callBack, (void *)data); in ObjectGetAllPropertyNamesFuzzTest() 54 object->GetAllPropertyNames(vm, filter); in ObjectGetAllPropertyNamesFuzzTest() 55 JSNApi::DestroyJSVM(vm); in ObjectGetAllPropertyNamesFuzzTest() 62 EcmaVM *vm = JSNApi::CreateJSVM(option); in ObjectGetNativePointerFieldCountFuzzTest() local 79 Local<ObjectRef> object = ObjectRef::New(vm); in ObjectGetNativePointerFieldCountFuzzTest() 80 object->SetNativePointerFieldCount(vm, key); in ObjectGetNativePointerFieldCountFuzzTest() 81 object->GetNativePointerFieldCount(vm); in ObjectGetNativePointerFieldCountFuzzTest() 82 JSNApi::DestroyJSVM(vm); in ObjectGetNativePointerFieldCountFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/exceptionclass_fuzzer/ |
| D | exceptionclass_fuzzer.cpp | 30 EcmaVM *vm = JSNApi::CreateJSVM(option); in ExpectionErrorFuzzTest() local 35 Local<StringRef> message = StringRef::NewFromUtf8(vm, (char*)data, (int)size); in ExpectionErrorFuzzTest() 36 [[maybe_unused]]Local<JSValueRef> error = Exception::Error(vm, message); in ExpectionErrorFuzzTest() 37 JSNApi::DestroyJSVM(vm); in ExpectionErrorFuzzTest() 44 EcmaVM *vm = JSNApi::CreateJSVM(option); in ExpectionRangeErrorFuzzTest() local 49 Local<StringRef> message = StringRef::NewFromUtf8(vm, (char*)data, (int)size); in ExpectionRangeErrorFuzzTest() 50 [[maybe_unused]]Local<JSValueRef> error = Exception::RangeError(vm, message); in ExpectionRangeErrorFuzzTest() 51 JSNApi::DestroyJSVM(vm); in ExpectionRangeErrorFuzzTest() 58 EcmaVM *vm = JSNApi::CreateJSVM(option); in ReferenceErrorFuzzTest() local 63 Local<StringRef> message = StringRef::NewFromUtf8(vm, (char*)data, (int)size); in ReferenceErrorFuzzTest() [all …]
|