|
@@ -30,8 +30,9 @@ PromiseBase& PromiseBase::operator=(PromiseBase&&) = default;
|
|
|
|
|
|
v8::Maybe<bool> PromiseBase::Reject() {
|
|
|
v8::HandleScope handle_scope(isolate());
|
|
|
- gin_helper::MicrotasksScope microtasks_scope(
|
|
|
- isolate(), GetContext()->GetMicrotaskQueue());
|
|
|
+ gin_helper::MicrotasksScope microtasks_scope{
|
|
|
+ isolate(), GetContext()->GetMicrotaskQueue(), false,
|
|
|
+ v8::MicrotasksScope::kRunMicrotasks};
|
|
|
v8::Context::Scope context_scope(GetContext());
|
|
|
|
|
|
return GetInner()->Reject(GetContext(), v8::Undefined(isolate()));
|
|
@@ -39,8 +40,9 @@ v8::Maybe<bool> PromiseBase::Reject() {
|
|
|
|
|
|
v8::Maybe<bool> PromiseBase::Reject(v8::Local<v8::Value> except) {
|
|
|
v8::HandleScope handle_scope(isolate());
|
|
|
- gin_helper::MicrotasksScope microtasks_scope(
|
|
|
- isolate(), GetContext()->GetMicrotaskQueue());
|
|
|
+ gin_helper::MicrotasksScope microtasks_scope{
|
|
|
+ isolate(), GetContext()->GetMicrotaskQueue(), false,
|
|
|
+ v8::MicrotasksScope::kRunMicrotasks};
|
|
|
v8::Context::Scope context_scope(GetContext());
|
|
|
|
|
|
return GetInner()->Reject(GetContext(), except);
|
|
@@ -49,8 +51,9 @@ v8::Maybe<bool> PromiseBase::Reject(v8::Local<v8::Value> except) {
|
|
|
v8::Maybe<bool> PromiseBase::RejectWithErrorMessage(
|
|
|
const std::string_view message) {
|
|
|
v8::HandleScope handle_scope(isolate());
|
|
|
- gin_helper::MicrotasksScope microtasks_scope(
|
|
|
- isolate(), GetContext()->GetMicrotaskQueue());
|
|
|
+ gin_helper::MicrotasksScope microtasks_scope{
|
|
|
+ isolate(), GetContext()->GetMicrotaskQueue(), false,
|
|
|
+ v8::MicrotasksScope::kRunMicrotasks};
|
|
|
v8::Context::Scope context_scope(GetContext());
|
|
|
|
|
|
v8::Local<v8::Value> error =
|
|
@@ -92,8 +95,9 @@ v8::Local<v8::Promise> Promise<void>::ResolvedPromise(v8::Isolate* isolate) {
|
|
|
|
|
|
v8::Maybe<bool> Promise<void>::Resolve() {
|
|
|
v8::HandleScope handle_scope(isolate());
|
|
|
- gin_helper::MicrotasksScope microtasks_scope(
|
|
|
- isolate(), GetContext()->GetMicrotaskQueue());
|
|
|
+ gin_helper::MicrotasksScope microtasks_scope{
|
|
|
+ isolate(), GetContext()->GetMicrotaskQueue(), false,
|
|
|
+ v8::MicrotasksScope::kRunMicrotasks};
|
|
|
v8::Context::Scope context_scope(GetContext());
|
|
|
|
|
|
return GetInner()->Resolve(GetContext(), v8::Undefined(isolate()));
|