Bug 551088 fix xpconnect signed warnings

r=dbradley

--HG--
extra : rebase_source : 01a2089bc2a3f3a402acaab68b8b9a6bce92bb09
This commit is contained in:
timeless@mozdev.org 2010-03-12 07:50:12 +01:00
parent 36ccbc2070
commit 643a7b230b
2 changed files with 2 additions and 2 deletions

View File

@ -2109,7 +2109,7 @@ XPCConvert::JSArray2Native(XPCCallContext& ccx, void** d, jsval s,
#define POPULATE(_mode, _t) \
PR_BEGIN_MACRO \
cleanupMode = _mode; \
if (capacity > ~(size_t)0 / sizeof(_t) || \
if (capacity > PR_UINT32_MAX / sizeof(_t) || \
nsnull == (array = nsMemory::Alloc(capacity * sizeof(_t)))) \
{ \
if(pErr) \

View File

@ -769,7 +769,7 @@ JSBool XPCJSRuntime::GCCallback(JSContext *cx, JSGCStatus status)
}
nsTArray<JSGCCallback> callbacks(self->extraGCCallbacks);
for (PRInt32 i = 0; i < callbacks.Length(); ++i) {
for (PRUint32 i = 0; i < callbacks.Length(); ++i) {
if (!callbacks[i](cx, status))
return JS_FALSE;
}