Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Unified Diff: src/api.cc

Issue 1801313002: Switch microtasks checks from V8_ENABLE_CHECKS to DEBUG to work with dcheck_always_on. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
« no previous file with comments | « src/api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698