Commit ed0afa96 authored by Andreas Haas's avatar Andreas Haas Committed by V8 LUCI CQ

[cleanup] Put debug code behind #ifdef DEBUG

Bug: v8:12926
Change-Id: I16d4b7d3e2af638ceb4f635fb114762c2f352616
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3678209
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80856}
parent 3b253419
......@@ -184,8 +184,8 @@ class V8_NODISCARD CallDepthScope {
!microtask_queue->DebugMicrotasksScopeDepthIsZero());
}
}
#endif
DCHECK(CheckKeptObjectsClearedAfterMicrotaskCheckpoint(microtask_queue));
#endif
isolate_->set_next_v8_call_is_safe_for_termination(safe_for_termination_);
}
......@@ -203,6 +203,7 @@ class V8_NODISCARD CallDepthScope {
}
private:
#ifdef DEBUG
bool CheckKeptObjectsClearedAfterMicrotaskCheckpoint(
i::MicrotaskQueue* microtask_queue) {
bool did_perform_microtask_checkpoint =
......@@ -212,6 +213,7 @@ class V8_NODISCARD CallDepthScope {
return !did_perform_microtask_checkpoint ||
isolate_->heap()->weak_refs_keep_during_job().IsUndefined(isolate_);
}
#endif
i::Isolate* const isolate_;
Local<Context> context_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment