[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: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/main@{#80856}
This commit is contained in:
parent
3b25341953
commit
ed0afa96ed
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user