Bug 711748 - Remove FIT_U32 from XPCConvert; r=bholley

This commit is contained in:
Ms2ger 2011-12-24 09:28:39 +01:00
Родитель ae9a97d17e
Коммит 52d070a1c5
1 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -147,11 +147,6 @@ XPCConvert::RemoveXPCOMUCStringFinalizer()
sXPCOMUCStringFinalizerIndex = -1; sXPCOMUCStringFinalizerIndex = -1;
} }
#define FIT_U32(i) ((i) <= JSVAL_INT_MAX \
? INT_TO_JSVAL(i) \
: DOUBLE_TO_JSVAL(i))
// static // static
JSBool JSBool
XPCConvert::NativeData2JS(XPCLazyCallContext& lccx, jsval* d, const void* s, 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_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_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_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_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_U64 : *d = DOUBLE_TO_JSVAL(jsdouble(*((uint64_t*)s))); break;
case nsXPTType::T_FLOAT : *d = DOUBLE_TO_JSVAL(*((float*)s)); break; case nsXPTType::T_FLOAT : *d = DOUBLE_TO_JSVAL(*((float*)s)); break;
case nsXPTType::T_DOUBLE: *d = DOUBLE_TO_JSVAL(*((double*)s)); break; case nsXPTType::T_DOUBLE: *d = DOUBLE_TO_JSVAL(*((double*)s)); break;