Bug 1751995 - Add TestOnlyIsTransactionComplete to MessageChannel r=ipc-reviewers,nika

This method (intended to be used only in tests) returns whether the current transaction stack is
complete, and is used by TestHangs to determine when to continue in the HangButReceive subtest.

Differential Revision: https://phabricator.services.mozilla.com/D203964
This commit is contained in:
Alex Franchuk
2024-03-13 13:10:14 +00:00
parent 913c684e61
commit d0a037d7bf
2 changed files with 11 additions and 0 deletions

View File

@@ -292,6 +292,11 @@ class MessageChannel : HasResultCodes {
void CancelCurrentTransaction() MOZ_EXCLUDES(*mMonitor);
// Return whether the current transaction is complete.
//
// This is intended only for tests.
bool TestOnlyIsTransactionComplete() const MOZ_EXCLUDES(*mMonitor);
// IsClosed and NumQueuedMessages are safe to call from any thread, but
// may provide an out-of-date value.
bool IsClosed() MOZ_EXCLUDES(*mMonitor) {