mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 674767: Use double conversion macros for jsvals, squash windows double r=glandium
This commit is contained in:
parent
3409dd8159
commit
4f9e57bfe0
@ -177,7 +177,7 @@ ReflectHistogramSnapshot(JSContext *cx, JSObject *obj, Histogram *h)
|
||||
if (!(JS_DefineProperty(cx, obj, "min", INT_TO_JSVAL(h->declared_min()), NULL, NULL, JSPROP_ENUMERATE)
|
||||
&& JS_DefineProperty(cx, obj, "max", INT_TO_JSVAL(h->declared_max()), NULL, NULL, JSPROP_ENUMERATE)
|
||||
&& JS_DefineProperty(cx, obj, "histogram_type", INT_TO_JSVAL(h->histogram_type()), NULL, NULL, JSPROP_ENUMERATE)
|
||||
&& JS_DefineProperty(cx, obj, "sum", INT_TO_JSVAL(ss.sum()), NULL, NULL, JSPROP_ENUMERATE)
|
||||
&& JS_DefineProperty(cx, obj, "sum", DOUBLE_TO_JSVAL(ss.sum()), NULL, NULL, JSPROP_ENUMERATE)
|
||||
&& (rarray = JS_NewArrayObject(cx, count, NULL))
|
||||
&& JS_DefineProperty(cx, obj, "ranges", OBJECT_TO_JSVAL(rarray), NULL, NULL, JSPROP_ENUMERATE)
|
||||
&& FillRanges(cx, rarray, h)
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
}
|
||||
|
||||
~AutoTimer() {
|
||||
Accumulate(id, (TimeStamp::Now() - start).ToMilliseconds());
|
||||
Accumulate(id, static_cast<PRUint32>((TimeStamp::Now() - start).ToMilliseconds()));
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -4,6 +4,7 @@
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
const INT_MAX = 0x7FFFFFFF;
|
||||
|
||||
const Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
@ -106,7 +107,7 @@ function run_test()
|
||||
{
|
||||
let kinds = [Telemetry.HISTOGRAM_EXPONENTIAL, Telemetry.HISTOGRAM_LINEAR]
|
||||
for each (let histogram_type in kinds) {
|
||||
let [min, max, bucket_count] = [1, 10000, 10]
|
||||
let [min, max, bucket_count] = [1, INT_MAX - 1, 10]
|
||||
test_histogram(histogram_type, "test::"+histogram_type, min, max, bucket_count);
|
||||
|
||||
const nh = Telemetry.newHistogram;
|
||||
|
Loading…
Reference in New Issue
Block a user