Bug 844146 - make JS and C++ codepaths for adding histogram values identical; r=taras

This commit is contained in:
Nathan Froyd 2013-02-22 12:38:43 -05:00
Родитель 20269a1222
Коммит d1e8bae855
1 изменённых файлов: 1 добавлений и 4 удалений

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

@ -643,10 +643,7 @@ JSHistogram_Add(JSContext *cx, unsigned argc, jsval *vp)
}
Histogram *h = static_cast<Histogram*>(JS_GetPrivate(obj));
if (h->histogram_type() == Histogram::BOOLEAN_HISTOGRAM)
h->Add(!!value);
else
h->Add(value);
h->Add(value);
}
return JS_TRUE;
}