Home
last modified time | relevance | path

Searched refs:promise (Results 1 – 25 of 35) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/
Djs_promise.cpp34 … const JSHandle<JSPromise> &promise) in CreateResolvingFunctions() argument
45 resolve->SetPromise(thread, promise); in CreateResolvingFunctions()
52 reject->SetPromise(thread, promise); in CreateResolvingFunctions()
62 JSTaggedValue JSPromise::FulfillPromise(JSThread *thread, const JSHandle<JSPromise> &promise, in FulfillPromise() argument
67 …ASSERT_PRINT(promise->GetPromiseState() == PromiseState::PENDING, "FulfillPromise: state must be p… in FulfillPromise()
69 JSHandle<TaggedQueue> reactions(thread, promise->GetPromiseFulfillReactions()); in FulfillPromise()
71 promise->SetPromiseResult(thread, value); in FulfillPromise()
73 promise->SetPromiseFulfillReactions(thread, globalConst->GetHandledUndefined()); in FulfillPromise()
75 promise->SetPromiseRejectReactions(thread, globalConst->GetHandledUndefined()); in FulfillPromise()
77 promise->SetPromiseState(PromiseState::FULFILLED); in FulfillPromise()
[all …]
Djs_async_generator_object.cpp169 JSTaggedValue promise = PromiseResolve(thread, in AsyncGeneratorResumeNext() local
171 JSHandle<JSPromise> handPromise(thread, promise); in AsyncGeneratorResumeNext()
278 JSHandle<JSObject> promise(thread, pcap->GetPromise()); in AsyncGeneratorEnqueue() local
279 return promise.GetTaggedValue(); in AsyncGeneratorEnqueue()
305 JSHandle<JSObject> promise(thread, pcap->GetPromise()); in AsyncGeneratorEnqueue() local
306 return promise.GetTaggedValue(); in AsyncGeneratorEnqueue()
309 …lue JSAsyncGeneratorObject::PromiseResolve(JSThread *thread, const JSHandle<JSTaggedValue> promise, in PromiseResolve() argument
313 ASSERT(promise->IsECMAObject()); in PromiseResolve()
318 if (JSTaggedValue::SameValue(ctorValue.GetTaggedValue(), promise.GetTaggedValue())) { in PromiseResolve()
322 … JSHandle<PromiseCapability> promiseCapability = JSPromise::NewPromiseCapability(thread, promise); in PromiseResolve()
Djs_async_function.cpp83 JSHandle<JSPromise> promise(thread, pcap->GetPromise()); in AsyncFunctionAwait() local
85 …thread, promise, JSHandle<JSTaggedValue>::Cast(fulFunc), JSHandle<JSTaggedValue>::Cast(rejFunc), t… in AsyncFunctionAwait()
142 JSHandle<JSObject> promise = JSHandle<JSObject>::Cast(promiseValue); in AsyncFunctionAwait() local
143 BuiltinsPromise::PerformPromiseThen(thread, JSHandle<JSPromise>::Cast(promise), in AsyncFunctionAwait()
Djs_promise.h111 … const JSHandle<JSPromise> &promise);
114 static JSTaggedValue FulfillPromise(JSThread *thread, const JSHandle<JSPromise> &promise,
124 static JSTaggedValue RejectPromise(JSThread *thread, const JSHandle<JSPromise> &promise,
Djs_async_from_sync_iterator.cpp80 JSHandle<JSObject> promise = JSHandle<JSObject>::Cast(valueWrapper); in AsyncFromSyncIteratorContinuation() local
89 builtins::BuiltinsPromise::PerformPromiseThen(thread, JSHandle<JSPromise>::Cast(promise), in AsyncFromSyncIteratorContinuation()
Decma_context.h80 const JSHandle<JSPromise> promise,
145 void PromiseRejectionTracker(const JSHandle<JSPromise> &promise, in PromiseRejectionTracker() argument
149 hostPromiseRejectionTracker_(vm_, promise, reason, operation, data_); in PromiseRejectionTracker()
Djs_async_generator_object.h94 static JSTaggedValue PromiseResolve(JSThread *thread, const JSHandle<JSTaggedValue> promise,
Decma_vm.cpp582 auto promise = JSPromise::Cast(result.GetTaggedObject()); in TriggerConcurrentCallback() local
583 auto status = promise->GetPromiseState(); in TriggerConcurrentCallback()
588 result = promise->GetPromiseResult(); in TriggerConcurrentCallback()
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_promise_test.cpp133 JSHandle<JSFunction> promise = JSHandle<JSFunction>::Cast(env->GetPromiseFunction()); in HWTEST_F_L0() local
136 …o ecmaRuntimeCallInfo1 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*promise), 6); in HWTEST_F_L0()
137 ecmaRuntimeCallInfo1->SetFunction(promise.GetTaggedValue()); in HWTEST_F_L0()
138 ecmaRuntimeCallInfo1->SetThis(promise.GetTaggedValue()); in HWTEST_F_L0()
163 JSHandle<JSFunction> promise = JSHandle<JSFunction>::Cast(env->GetPromiseFunction()); in HWTEST_F_L0() local
170 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, promise.GetTaggedValue(),… in HWTEST_F_L0()
171 ecmaRuntimeCallInfo->SetFunction(promise.GetTaggedValue()); in HWTEST_F_L0()
172 ecmaRuntimeCallInfo->SetThis(promise.GetTaggedValue()); in HWTEST_F_L0()
185 …auto ecmaRuntimeCallInfo1 = TestHelper::CreateEcmaRuntimeCallInfo(thread, promise.GetTaggedValue()… in HWTEST_F_L0()
186 ecmaRuntimeCallInfo1->SetFunction(promise.GetTaggedValue()); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/
DthisCapture1.ts27 AssertType(ret.always(() => { this.y = 0; }).promise(), "any");
28 AssertType(ret.always(() => { this.y = 0; }).promise, "any");
40 }).promise();
DasyncFunctionsAndStrictNullChecks.ts33 async function sample(promise: Windows.Foundation.IPromise<number>) {
34 let number = await promise;
36 AssertType(await promise, "number");
37 AssertType(promise, "Windows.Foundation.IPromise<number>");
/arkcompiler/ets_runtime/test/moduletest/forawaitof/
Dforawaitof.js35 let promise = fn(); variable
37 promise.then(() => print(iterCount));
/arkcompiler/ets_runtime/ecmascript/tests/
Djs_promise_test.cpp78 JSHandle<JSTaggedValue> promise = env->GetPromiseFunction(); in HWTEST_F_L0() local
80 JSHandle<PromiseCapability> capbility = JSPromise::NewPromiseCapability(thread, promise); in HWTEST_F_L0()
99 JSHandle<JSTaggedValue> promise = env->GetPromiseFunction(); in HWTEST_F_L0() local
100 JSHandle<PromiseCapability> capbility = JSPromise::NewPromiseCapability(thread, promise); in HWTEST_F_L0()
118 JSHandle<JSTaggedValue> promise = env->GetPromiseFunction(); in HWTEST_F_L0() local
119 JSHandle<PromiseCapability> capbility = JSPromise::NewPromiseCapability(thread, promise); in HWTEST_F_L0()
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/systemModuleAmbientDeclarations/
Dfile1.ts26 export let promise = Promise; variable
27 AssertType(promise, "typeof Promise");
/arkcompiler/ets_runtime/test/aottest/async_context/
Dds_manager.ts31 let promise = this.dataHelper.getDsHelper()
36 promise.then((dsHelper) => {
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_promise.cpp282 JSHandle<JSObject> promise(thread, promiseCapability->GetPromise()); in Resolve() local
283 return promise.GetTaggedValue(); in Resolve()
319 JSHandle<JSObject> promise(thread, promiseCapability->GetPromise()); in Reject() local
320 return promise.GetTaggedValue(); in Reject()
341 JSHandle<JSTaggedValue> promise = GetThis(argv); in Catch() local
346 …EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, promise, undefined, 2); // 2: «undefined, o… in Catch()
370 JSHandle<JSObject> promise = JSHandle<JSObject>::Cast(thisValue); in Then() local
372 … JSHandle<JSTaggedValue> constructor = JSObject::SpeciesConstructor(thread, promise, defaultFunc); in Then()
384 …return PerformPromiseThen(thread, JSHandle<JSPromise>::Cast(promise), onFulfilled, onRejected, res… in Then()
387 …ggedValue BuiltinsPromise::PerformPromiseThen(JSThread *thread, const JSHandle<JSPromise> &promise, in PerformPromiseThen() argument
[all …]
Dbuiltins_async_from_sync_iterator.cpp130 JSHandle<JSObject> promise(thread, pcap->GetPromise()); in Throw() local
131 return promise.GetTaggedValue(); in Throw()
174 JSHandle<JSObject> promise(thread, pcap->GetPromise()); in Return() local
175 return promise.GetTaggedValue(); in Return()
206 JSHandle<JSObject> promise(thread, pcap->GetPromise()); in Return() local
207 return promise.GetTaggedValue(); in Return()
Dbuiltins_promise_job.cpp99 JSHandle<JSTaggedValue> promise = GetCallArg(argv, 0); in PromiseResolveThenableJob() local
100 ASSERT(promise->IsJSPromise()); in PromiseResolveThenableJob()
103 JSPromise::CreateResolvingFunctions(thread, JSHandle<JSPromise>::Cast(promise)); in PromiseResolveThenableJob()
Dbuiltins_promise.h46 static JSTaggedValue PerformPromiseThen(JSThread *thread, const JSHandle<JSPromise> &promise,
/arkcompiler/ets_frontend/test262/
DdynamicImport_tests.txt2 returns-promise.js
309 promise-then-ns-has-property-sym-not-found.js
310 promise-then-ns-get-sym-not-found.js
312 promise-then-ns-get-nested-namespace-dflt-direct.js
313 promise-then-ns-delete-exported-init-strict.js
315 promise-then-ns-get-str-found.js
317 promise-then-ns-set-prototype-of.js
318 promise-then-ns-delete-exported-init-no-strict.js
319 promise-then-ns-set-same-values-strict.js
322 promise-then-ns-has-property-sym-found.js
[all …]
/arkcompiler/ets_runtime/test/moduletest/
DBUILD.gn87 "promise",
200 "promise",
300 "promise",
/arkcompiler/ets_runtime/test/moduletest/promise/
DBUILD.gn16 host_moduletest_action("promise") {
/arkcompiler/ets_runtime/ecmascript/napi/test/
Djsnapi_tests.cpp423 Local<PromiseRef> promise = capability->GetPromise(vm_); in HWTEST_F_L0() local
425 Local<PromiseRef> catchPromise = promise->Catch(vm_, reject); in HWTEST_F_L0()
426 ASSERT_TRUE(promise->IsPromise()); in HWTEST_F_L0()
455 Local<PromiseRef> promise = capability->GetPromise(vm_); in HWTEST_F_L0() local
458 Local<PromiseRef> thenPromise = promise->Then(vm_, resolve, reject); in HWTEST_F_L0()
459 ASSERT_TRUE(promise->IsPromise()); in HWTEST_F_L0()
1187 Local<PromiseRef> promise = capability->GetPromise(vm_); in HWTEST_F_L0() local
1189 Local<PromiseRef> catchPromise = promise->Finally(vm_, reject); in HWTEST_F_L0()
1190 ASSERT_TRUE(promise->IsPromise()); in HWTEST_F_L0()
1192 Local<PromiseRef> catchPromise1 = promise->Then(vm_, reject, reject); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/napi/
Djsnapi.cpp816 const JSHandle<JSPromise> promise, in HostPromiseRejectionTracker() argument
825 …JSValueRef> promiseVal = JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>::Cast(promise)); in HostPromiseRejectionTracker()
865 PromiseRejectInfo::PromiseRejectInfo(Local<JSValueRef> promise, Local<JSValueRef> reason, in PromiseRejectInfo() argument
867 : promise_(promise), reason_(reason), operation_(operation), data_(data) {} in PromiseRejectInfo()
1984 JSHandle<JSTaggedValue> promise = JSNApiHelper::ToJSHandle(this); in Catch() local
1985 LOG_IF_SPECIAL(promise, ERROR); in Catch()
1990 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, promise, undefined, 1); in Catch()
2005 JSHandle<JSTaggedValue> promise = JSNApiHelper::ToJSHandle(this); in Finally() local
2006 LOG_IF_SPECIAL(promise, ERROR); in Finally()
2011 …ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, promise, undefined, 2); // 2: t… in Finally()
[all …]
/arkcompiler/ets_runtime/test/moduletest/stubbuilder/
Dstubbuilder.js885 let promise = new Promise((resolve, reject) => { variable
889 promise.then(function() {

12