summaryrefslogtreecommitdiffstats
path: root/ipc/glue/ProtocolUtils.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /ipc/glue/ProtocolUtils.h
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/glue/ProtocolUtils.h')
-rw-r--r--ipc/glue/ProtocolUtils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ipc/glue/ProtocolUtils.h b/ipc/glue/ProtocolUtils.h
index 2a0c64de20..7edce9612b 100644
--- a/ipc/glue/ProtocolUtils.h
+++ b/ipc/glue/ProtocolUtils.h
@@ -341,6 +341,9 @@ class IProtocol : public HasResultCodes {
mozilla::ipc::IPCResult::FailUnsafePrintfImpl( \
WrapNotNull(actor), __func__, nsPrintfCString(format, ##__VA_ARGS__))
+#define IPC_TEST_FAIL(actor) \
+ mozilla::ipc::IPCResult::FailForTesting(WrapNotNull(actor), __func__, "")
+
/**
* All message deserializers and message handlers should return this type via
* the above macros. We use a less generic name here to avoid conflict with
@@ -379,6 +382,10 @@ class IPCResult {
return FailImpl(aActor, aWhere, aWhy.get());
}
+ // Only used in testing.
+ static IPCResult FailForTesting(NotNull<IProtocol*> aActor,
+ const char* aWhere, const char* aWhy);
+
private:
static IPCResult FailImpl(NotNull<IProtocol*> aActor, const char* aWhere,
const char* aWhy);