Bug 440779 - JS_NewDouble oddness in nsJSEnvironment.cpp (r+sr=jst)

This commit is contained in:
Jason Orendorff 2008-07-21 15:16:47 -05:00
parent a721c4227c
commit ca32aebffa

View File

@ -2730,9 +2730,8 @@ nsJSContext::AddSupportsPrimitiveTojsvals(nsISupports *aArg, jsval *aArgv)
p->GetData(&data); p->GetData(&data);
jsdouble *d = ::JS_NewDouble(cx, data); JSBool ok = ::JS_NewNumberValue(cx, data, aArgv);
NS_ENSURE_TRUE(ok, NS_ERROR_OUT_OF_MEMORY);
*aArgv = DOUBLE_TO_JSVAL(d);
break; break;
} }
@ -2744,9 +2743,8 @@ nsJSContext::AddSupportsPrimitiveTojsvals(nsISupports *aArg, jsval *aArgv)
p->GetData(&data); p->GetData(&data);
jsdouble *d = ::JS_NewDouble(cx, data); JSBool ok = ::JS_NewNumberValue(cx, data, aArgv);
NS_ENSURE_TRUE(ok, NS_ERROR_OUT_OF_MEMORY);
*aArgv = DOUBLE_TO_JSVAL(d);
break; break;
} }