Skip to content

Commit

Permalink
Merge pull request #792 from cloudflare/swarfield/debug-mode-for-gc
Browse files Browse the repository at this point in the history
Noop for test GC pass when not in debug
  • Loading branch information
Warfields authored Jun 20, 2023
2 parents 3c15df5 + 952080d commit 96876a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/workerd/io/worker-entrypoint.c++
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ kj::Promise<WorkerInterface::CustomEvent::Result>
template <typename T>
void WorkerEntrypoint::maybeAddGcPassForTest(
IoContext& context, kj::Promise<T>& promise) {
#ifdef KJ_DEBUG
if (isPredictableModeForTest()) {
auto worker = kj::atomicAddRef(context.getWorker());
if constexpr (kj::isSameType<T, void>()) {
Expand All @@ -530,6 +531,7 @@ void WorkerEntrypoint::maybeAddGcPassForTest(
});
}
}
#endif
}

} // namespace workerd

0 comments on commit 96876a6

Please # to comment.