| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 71b8864d1f0245ff8e0c165b5ac231fca24429e6..db7caaa143ce8344e61cff68663cf98c3fe87dfd 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -157,7 +157,7 @@ class InternalEscapableScope : public v8::EscapableHandleScope {
|
| };
|
|
|
|
|
| -#ifdef V8_ENABLE_CHECKS
|
| +#ifdef DEBUG
|
| void CheckMicrotasksScopesConsistency(i::Isolate* isolate) {
|
| auto handle_scope_implementer = isolate->handle_scope_implementer();
|
| if (handle_scope_implementer->microtasks_policy() ==
|
| @@ -188,7 +188,7 @@ class CallDepthScope {
|
| if (!context_.IsEmpty()) context_->Exit();
|
| if (!escaped_) isolate_->handle_scope_implementer()->DecrementCallDepth();
|
| if (do_callback_) isolate_->FireCallCompletedCallback();
|
| -#ifdef V8_ENABLE_CHECKS
|
| +#ifdef DEBUG
|
| if (do_callback_) CheckMicrotasksScopesConsistency(isolate_);
|
| #endif
|
| }
|
| @@ -7744,7 +7744,7 @@ MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type)
|
| run_(type == MicrotasksScope::kRunMicrotasks) {
|
| auto handle_scope_implementer = isolate_->handle_scope_implementer();
|
| if (run_) handle_scope_implementer->IncrementMicrotasksScopeDepth();
|
| -#ifdef V8_ENABLE_CHECKS
|
| +#ifdef DEBUG
|
| if (!run_) handle_scope_implementer->IncrementDebugMicrotasksScopeDepth();
|
| #endif
|
| }
|
| @@ -7759,7 +7759,7 @@ MicrotasksScope::~MicrotasksScope() {
|
| PerformCheckpoint(reinterpret_cast<Isolate*>(isolate_));
|
| }
|
| }
|
| -#ifdef V8_ENABLE_CHECKS
|
| +#ifdef DEBUG
|
| if (!run_) handle_scope_implementer->DecrementDebugMicrotasksScopeDepth();
|
| #endif
|
| }
|
|
|