ceftests: Avoid shutdown hang due to leaked TestHandlers

This commit is contained in:
Marshall Greenblatt
2024-01-26 12:58:17 -05:00
parent 132ac7a180
commit 2a86a02bdd
2 changed files with 14 additions and 4 deletions

View File

@@ -211,9 +211,9 @@ class TestHandler : public CefClient,
void OnWindowCreated(int browser_id);
void OnWindowDestroyed(int browser_id);
// Returns true if a TestHandler currently exists.
static bool HasTestHandler() {
return test_handler_count_.load(std::memory_order_relaxed) > 0U;
// Returns the count of TestHandlers the currently exist.
static size_t GetTestHandlerCount() {
return test_handler_count_.load(std::memory_order_relaxed);
}
std::string debug_string_prefix() const { return debug_string_prefix_; }