27 Handle<JsValue> value) {
28 promises_.emplace_back(promise, value);
37 for (
auto it = promises_.begin(); it != promises_.end(); it++) {
38 if (it->promise == promise) {
46 RejectedPromiseHandler::PromiseInfo::PromiseInfo(Handle<JsPromise> promise,
47 Handle<JsValue> value)
48 : promise(promise), value(value) {}
50 RejectedPromiseHandler::PromiseInfo::~PromiseInfo() {}
54 for (
auto& info : promises_) {
58 has_callback_ =
false;
void AddPromise(Handle< JsPromise > promise, Handle< JsValue > value)
static JsManagerImpl * Instance()
~RejectedPromiseHandler()
std::shared_ptr< ThreadEvent< impl::RetOf< Func > > > AddInternalTask(TaskPriority priority, const std::string &name, Func &&callback)
void OnUncaughtException(JSValueRef exception, bool in_promise)
void RemovePromise(Handle< JsPromise > promise)
void LogUnhandledRejection()
TaskRunner * MainThread()