Bug 615323 warning: comparison between signed and unsigned integer expressions in xpcjsruntime.cpp

r=mrbkap
This commit is contained in:
timeless@mozdev.org 2011-03-28 17:26:33 -04:00
parent 99b3bfb912
commit 52bd717d9f

View File

@ -975,7 +975,7 @@ XPCJSRuntime::WatchdogMain(void *arg)
while (self->mWatchdogThread)
{
// Sleep only 1 second if recently (or currently) active; otherwise, hibernate
if (self->mLastActiveTime == -1 || PR_Now() - self->mLastActiveTime <= 2*PR_USEC_PER_SEC)
if (self->mLastActiveTime == -1 || PR_Now() - self->mLastActiveTime <= PRTime(2*PR_USEC_PER_SEC))
sleepInterval = PR_TicksPerSecond();
else
{
@ -1474,7 +1474,7 @@ XPCJSRuntime::OnJSContextNew(JSContext *cx)
return JS_FALSE;
JS_SetNativeStackQuota(cx, 128 * sizeof(size_t) * 1024);
PRInt64 totalMemory = PR_GetPhysicalMemorySize();
PRUint64 totalMemory = PR_GetPhysicalMemorySize();
size_t quota = PR_MIN(PR_UINT32_MAX, PR_MAX(25 * sizeof(size_t) * 1024 * 1024,
totalMemory / 4));
JS_SetScriptStackQuota(cx, quota);