bool TestHangsParent::AnswerStackFrame() { if (PTestHangs::HANG != state()) { if (CallStackFrame()) fail("should have timed out!"); } else { // minimum possible, 2 ms. We want to detecting a hang to race // with the reply coming in, as reliably as possible SetReplyTimeoutMs(2); if (CallHang()) fail("should have timed out!"); } return true; }
mozilla::ipc::IPCResult TestHangsParent::AnswerStackFrame() { ++mNumAnswerStackFrame; // MOZ_ASSERT((PTestHangs::HANG != state()) == (mNumAnswerStackFrame == 1)); if (mNumAnswerStackFrame == 1) { if (CallStackFrame()) { fail("should have timed out!"); } } else if (mNumAnswerStackFrame == 2) { // minimum possible, 2 ms. We want to detecting a hang to race // with the reply coming in, as reliably as possible SetReplyTimeoutMs(2); if (CallHang()) fail("should have timed out!"); } else { fail("unexpected state"); } return IPC_OK(); }