From 1fb9a20a642504f4c2678a9a91976f21971aef4d Mon Sep 17 00:00:00 2001 From: Jed Davis Date: Fri, 19 Jun 2015 14:26:44 -0700 Subject: [PATCH] Bug 1176085 - Fix second/nanosecond confusion in Linux sandbox start error case. r=kang --HG-- extra : amend_source : e546416d9c058305f4cb00d1c015daaec8ab1362 --- security/sandbox/linux/Sandbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/sandbox/linux/Sandbox.cpp b/security/sandbox/linux/Sandbox.cpp index 1520dd9a4c05..2f851e25d9f7 100644 --- a/security/sandbox/linux/Sandbox.cpp +++ b/security/sandbox/linux/Sandbox.cpp @@ -394,8 +394,8 @@ BroadcastSetThreadSandbox(UniquePtr aProgram, size_t aProgLen) } struct timespec now; clock_gettime(CLOCK_MONOTONIC, &now); - if (now.tv_sec > timeLimit.tv_nsec || - (now.tv_sec == timeLimit.tv_nsec && + if (now.tv_sec > timeLimit.tv_sec || + (now.tv_sec == timeLimit.tv_sec && now.tv_nsec > timeLimit.tv_nsec)) { SANDBOX_LOG_ERROR("Thread %d unresponsive for %d seconds." " Killing process.",