Bug 712055 - Remove xpc_qsInt32ToJsval/xpc_qsUint32ToJsval; r=jorendorff

This commit is contained in:
Ms2ger 2011-12-24 09:28:14 +01:00
parent d78a953c36
commit 8ab0c6de34
3 changed files with 8 additions and 21 deletions

View File

@ -233,23 +233,6 @@ xpc_qsGetterOnlyPropertyStub(JSContext *cx, JSObject *obj, jsid id, JSBool stric
/* Functions for converting values between COM and JS. */
inline JSBool
xpc_qsInt32ToJsval(JSContext *cx, PRInt32 i, jsval *rv)
{
*rv = INT_TO_JSVAL(i);
return true;
}
inline JSBool
xpc_qsUint32ToJsval(JSContext *cx, PRUint32 u, jsval *rv)
{
if (u <= JSVAL_INT_MAX)
*rv = INT_TO_JSVAL(u);
else
*rv = DOUBLE_TO_JSVAL(u);
return true;
}
inline JSBool
xpc_qsInt64ToJsval(JSContext *cx, PRInt64 i, jsval *rv)
{

View File

@ -347,7 +347,8 @@ resultConvTemplates = {
" return JS_TRUE;\n",
'long':
" return xpc_qsInt32ToJsval(cx, result, ${jsvalPtr});\n",
" ${jsvalRef} = INT_TO_JSVAL(result);\n"
" return JS_TRUE;\n",
'long long':
" return xpc_qsInt64ToJsval(cx, result, ${jsvalPtr};\n",
@ -357,7 +358,8 @@ resultConvTemplates = {
" return JS_TRUE;\n",
'unsigned long':
" return xpc_qsUint32ToJsval(cx, result, ${jsvalPtr});\n",
" ${jsvalRef} = UINT_TO_JSVAL(result);\n"
" return JS_TRUE;\n",
'unsigned long long':
" return xpc_qsUint64ToJsval(cx, result, ${jsvalPtr});\n",

View File

@ -641,7 +641,8 @@ resultConvTemplates = {
" return JS_TRUE;\n",
'long':
" return xpc_qsInt32ToJsval(cx, result, ${jsvalPtr});\n",
" ${jsvalRef} = INT_TO_JSVAL(result);\n"
" return JS_TRUE;\n",
'long long':
" return xpc_qsInt64ToJsval(cx, result, ${jsvalPtr});\n",
@ -651,7 +652,8 @@ resultConvTemplates = {
" return JS_TRUE;\n",
'unsigned long':
" return xpc_qsUint32ToJsval(cx, result, ${jsvalPtr});\n",
" ${jsvalRef} = UINT_TO_JSVAL(result);\n"
" return JS_TRUE;\n",
'unsigned long long':
" return xpc_qsUint64ToJsval(cx, result, ${jsvalPtr});\n",