summaryrefslogtreecommitdiffstats
path: root/ipc/glue/ProtocolUtils.h
diff options
context:
space:
mode:
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);