|
@@ -26,8 +26,7 @@ PromiseBase& PromiseBase::operator=(PromiseBase&&) = default;
|
|
|
v8::Maybe<bool> PromiseBase::Reject() {
|
|
|
gin_helper::Locker locker(isolate());
|
|
|
v8::HandleScope handle_scope(isolate());
|
|
|
- v8::MicrotasksScope script_scope(isolate(),
|
|
|
- v8::MicrotasksScope::kRunMicrotasks);
|
|
|
+ gin_helper::MicrotasksScope microtasks_scope(isolate());
|
|
|
v8::Context::Scope context_scope(GetContext());
|
|
|
|
|
|
return GetInner()->Reject(GetContext(), v8::Undefined(isolate()));
|
|
@@ -36,8 +35,7 @@ v8::Maybe<bool> PromiseBase::Reject() {
|
|
|
v8::Maybe<bool> PromiseBase::Reject(v8::Local<v8::Value> except) {
|
|
|
gin_helper::Locker locker(isolate());
|
|
|
v8::HandleScope handle_scope(isolate());
|
|
|
- v8::MicrotasksScope script_scope(isolate(),
|
|
|
- v8::MicrotasksScope::kRunMicrotasks);
|
|
|
+ gin_helper::MicrotasksScope microtasks_scope(isolate());
|
|
|
v8::Context::Scope context_scope(GetContext());
|
|
|
|
|
|
return GetInner()->Reject(GetContext(), except);
|
|
@@ -46,8 +44,7 @@ v8::Maybe<bool> PromiseBase::Reject(v8::Local<v8::Value> except) {
|
|
|
v8::Maybe<bool> PromiseBase::RejectWithErrorMessage(base::StringPiece message) {
|
|
|
gin_helper::Locker locker(isolate());
|
|
|
v8::HandleScope handle_scope(isolate());
|
|
|
- v8::MicrotasksScope script_scope(isolate(),
|
|
|
- v8::MicrotasksScope::kRunMicrotasks);
|
|
|
+ gin_helper::MicrotasksScope microtasks_scope(isolate());
|
|
|
v8::Context::Scope context_scope(GetContext());
|
|
|
|
|
|
v8::Local<v8::Value> error =
|
|
@@ -90,8 +87,7 @@ v8::Local<v8::Promise> Promise<void>::ResolvedPromise(v8::Isolate* isolate) {
|
|
|
v8::Maybe<bool> Promise<void>::Resolve() {
|
|
|
gin_helper::Locker locker(isolate());
|
|
|
v8::HandleScope handle_scope(isolate());
|
|
|
- v8::MicrotasksScope script_scope(isolate(),
|
|
|
- v8::MicrotasksScope::kRunMicrotasks);
|
|
|
+ gin_helper::MicrotasksScope microtasks_scope(isolate());
|
|
|
v8::Context::Scope context_scope(GetContext());
|
|
|
|
|
|
return GetInner()->Resolve(GetContext(), v8::Undefined(isolate()));
|