• Home
  • Raw
  • Download

Lines Matching refs:JSHandle

34 void JSAsyncFunction::AsyncFunctionAwait(JSThread *thread, const JSHandle<JSAsyncFuncObject> &async…  in AsyncFunctionAwait()
35 const JSHandle<JSTaggedValue> &value) in AsyncFunctionAwait()
41 JSHandle<JSTaggedValue> asyncCtxt(thread, asyncFuncObj->GetGeneratorContext()); in AsyncFunctionAwait()
44 JSHandle<GlobalEnv> env = vm->GetGlobalEnv(); in AsyncFunctionAwait()
46 JSHandle<PromiseCapability> pcap = in AsyncFunctionAwait()
47 … JSPromise::NewPromiseCapability(thread, JSHandle<JSTaggedValue>::Cast(env->GetPromiseFunction())); in AsyncFunctionAwait()
51 JSHandle<JSTaggedValue> resolve(thread, pcap->GetResolve()); in AsyncFunctionAwait()
52 JSHandle<JSTaggedValue> thisArg = globalConst->GetHandledUndefined(); in AsyncFunctionAwait()
54 JSHandle<JSTaggedValue> undefined = globalConst->GetHandledUndefined(); in AsyncFunctionAwait()
63 JSHandle<JSAsyncAwaitStatusFunction> fulFunc = factory->NewJSAsyncAwaitStatusFunction( in AsyncFunctionAwait()
67 JSHandle<JSAsyncAwaitStatusFunction> rejFunc = factory->NewJSAsyncAwaitStatusFunction( in AsyncFunctionAwait()
77 JSHandle<PromiseCapability> tcap = in AsyncFunctionAwait()
78 … JSPromise::NewPromiseCapability(thread, JSHandle<JSTaggedValue>::Cast(env->GetPromiseFunction())); in AsyncFunctionAwait()
80 JSHandle<JSPromise>(thread, tcap->GetPromise())->SetPromiseIsHandled(true); in AsyncFunctionAwait()
83 JSHandle<JSPromise> promise(thread, pcap->GetPromise()); in AsyncFunctionAwait()
85 …thread, promise, JSHandle<JSTaggedValue>::Cast(fulFunc), JSHandle<JSTaggedValue>::Cast(rejFunc), t… in AsyncFunctionAwait()
95 void JSAsyncFunction::AsyncFunctionAwait(JSThread *thread, const JSHandle<JSTaggedValue> &asyncFunc… in AsyncFunctionAwait()
96 const JSHandle<JSTaggedValue> &value) in AsyncFunctionAwait()
101 JSHandle<JSTaggedValue> asyncCtxt; in AsyncFunctionAwait()
103 JSHandle<JSObject> obj = JSTaggedValue::ToObject(thread, asyncFuncObj); in AsyncFunctionAwait()
105 JSHandle<JSAsyncGeneratorObject> asyncGen = JSHandle<JSAsyncGeneratorObject>::Cast(obj); in AsyncFunctionAwait()
106 asyncCtxt = JSHandle<JSTaggedValue>(thread, asyncGen->GetGeneratorContext()); in AsyncFunctionAwait()
108 JSHandle<JSObject> obj = JSTaggedValue::ToObject(thread, asyncFuncObj); in AsyncFunctionAwait()
110 JSHandle<JSAsyncFuncObject> asyncFun = JSHandle<JSAsyncFuncObject>::Cast(obj); in AsyncFunctionAwait()
111 asyncCtxt = JSHandle<JSTaggedValue>(thread, asyncFun->GetGeneratorContext()); in AsyncFunctionAwait()
115 JSHandle<GlobalEnv> env = vm->GetGlobalEnv(); in AsyncFunctionAwait()
116 JSHandle<JSTaggedValue> promiseValue = in AsyncFunctionAwait()
118JSHandle<JSTaggedValue>::Cast(env->GetPromiseFunction()), in AsyncFunctionAwait()
122 JSHandle<JSAsyncAwaitStatusFunction> fulFunc = factory->NewJSAsyncAwaitStatusFunction( in AsyncFunctionAwait()
126 JSHandle<JSAsyncAwaitStatusFunction> rejFunc = factory->NewJSAsyncAwaitStatusFunction( in AsyncFunctionAwait()
136 JSHandle<PromiseCapability> tcap = in AsyncFunctionAwait()
137 … JSPromise::NewPromiseCapability(thread, JSHandle<JSTaggedValue>::Cast(env->GetPromiseFunction())); in AsyncFunctionAwait()
139 JSHandle<JSPromise>(thread, tcap->GetPromise())->SetPromiseIsHandled(true); in AsyncFunctionAwait()
142 JSHandle<JSObject> promise = JSHandle<JSObject>::Cast(promiseValue); in AsyncFunctionAwait()
143 BuiltinsPromise::PerformPromiseThen(thread, JSHandle<JSPromise>::Cast(promise), in AsyncFunctionAwait()
144 JSHandle<JSTaggedValue>::Cast(fulFunc), in AsyncFunctionAwait()
145 JSHandle<JSTaggedValue>::Cast(rejFunc), tcap); in AsyncFunctionAwait()
155 JSHandle<JSTaggedValue> JSAsyncAwaitStatusFunction::AsyncFunctionAwaitFulfilled( in AsyncFunctionAwaitFulfilled()
156 …JSThread *thread, const JSHandle<JSAsyncAwaitStatusFunction> &func, const JSHandle<JSTaggedValue> … in AsyncFunctionAwaitFulfilled()
159 JSHandle<GeneratorContext> asyncCtxt(thread, func->GetAsyncContext()); in AsyncFunctionAwaitFulfilled()
161 JSHandle<JSTaggedValue> tagVal(thread, asyncCtxt->GetGeneratorObject()); in AsyncFunctionAwaitFulfilled()
164 return JSHandle<JSTaggedValue>(thread, JSTaggedValue::Undefined()); in AsyncFunctionAwaitFulfilled()
176 return JSHandle<JSTaggedValue>(thread, JSTaggedValue::Undefined()); in AsyncFunctionAwaitFulfilled()
180 JSHandle<JSTaggedValue> JSAsyncAwaitStatusFunction::AsyncFunctionAwaitRejected( in AsyncFunctionAwaitRejected()
181 …JSThread *thread, const JSHandle<JSAsyncAwaitStatusFunction> &func, const JSHandle<JSTaggedValue> … in AsyncFunctionAwaitRejected()
184 JSHandle<GeneratorContext> asyncCtxt(thread, func->GetAsyncContext()); in AsyncFunctionAwaitRejected()
186 JSHandle<JSTaggedValue> tagVal(thread, asyncCtxt->GetGeneratorObject()); in AsyncFunctionAwaitRejected()
189 JSHandle<CompletionRecord> completionRecord = in AsyncFunctionAwaitRejected()
192 return JSHandle<JSTaggedValue>(thread, JSTaggedValue::Undefined()); in AsyncFunctionAwaitRejected()
200 JSHandle<JSObject> result = GeneratorHelper::Throw(thread, asyncCtxt, reason.GetTaggedValue()); in AsyncFunctionAwaitRejected()
205 return JSHandle<JSTaggedValue>::Cast(result); in AsyncFunctionAwaitRejected()