Bug 2049523 - Make ToJSValue for float consistent with double.

This commit is contained in:
Andrew McCreight authored and Moonchild committed 2026-07-25 17:04:14 +02:00
1 parent 28c47723b2
commit e75201f7d1
1 file changed
+2 -2
+2 -2
View File
@@ -97,7 +97,7 @@ ToJSValue(JSContext* aCx,
return true;
}
// accept floating point types
// Accept floating point types
inline bool
ToJSValue(JSContext* aCx,
float aArgument,
@@ -106,7 +106,7 @@ ToJSValue(JSContext* aCx,
// Make sure we're called in a compartment
MOZ_ASSERT(JS::CurrentGlobalOrNull(aCx));
aValue.setNumber(aArgument);
aValue.set(JS_NumberValue(double(aArgument)));
return true;
}