From 52d070a1c518852a282469df339485accb78d683 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sat, 24 Dec 2011 09:28:39 +0100 Subject: [PATCH] Bug 711748 - Remove FIT_U32 from XPCConvert; r=bholley --- js/xpconnect/src/XPCConvert.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/js/xpconnect/src/XPCConvert.cpp b/js/xpconnect/src/XPCConvert.cpp index 700f6f956edb..0ac11b4d2b7f 100644 --- a/js/xpconnect/src/XPCConvert.cpp +++ b/js/xpconnect/src/XPCConvert.cpp @@ -147,11 +147,6 @@ XPCConvert::RemoveXPCOMUCStringFinalizer() sXPCOMUCStringFinalizerIndex = -1; } - -#define FIT_U32(i) ((i) <= JSVAL_INT_MAX \ - ? INT_TO_JSVAL(i) \ - : DOUBLE_TO_JSVAL(i)) - // static JSBool XPCConvert::NativeData2JS(XPCLazyCallContext& lccx, jsval* d, const void* s, @@ -176,9 +171,9 @@ XPCConvert::NativeData2JS(XPCLazyCallContext& lccx, jsval* d, const void* s, case nsXPTType::T_I16 : *d = INT_TO_JSVAL(int32_t(*((int16_t*)s))); break; case nsXPTType::T_I32 : *d = INT_TO_JSVAL(*((int32_t*)s)); break; case nsXPTType::T_I64 : *d = DOUBLE_TO_JSVAL(jsdouble(*((int64_t*)s))); break; - case nsXPTType::T_U8 : *d = INT_TO_JSVAL(int32_t(*((uint8*)s))); break; + case nsXPTType::T_U8 : *d = INT_TO_JSVAL(int32_t(*((uint8_t*)s))); break; case nsXPTType::T_U16 : *d = INT_TO_JSVAL(int32_t(*((uint16_t*)s))); break; - case nsXPTType::T_U32 : *d = FIT_U32(*((uint32_t*)s)); break; + case nsXPTType::T_U32 : *d = UINT_TO_JSVAL(*((uint32_t*)s)); break; case nsXPTType::T_U64 : *d = DOUBLE_TO_JSVAL(jsdouble(*((uint64_t*)s))); break; case nsXPTType::T_FLOAT : *d = DOUBLE_TO_JSVAL(*((float*)s)); break; case nsXPTType::T_DOUBLE: *d = DOUBLE_TO_JSVAL(*((double*)s)); break;