Bug 844146 - make JS and C++ codepaths for adding histogram values identical; r=taras
authorNathan Froyd <froydnj@mozilla.com>
Fri, 22 Feb 2013 12:38:43 -0500
changeset 123185 e1a74396082edb2290e54cab1402645b55095b9e
parent 123184 79db8bedd0aa7ffbff1ae661bbe8a49a827f0b30
child 123186 b5a0506b326d62a901e40721a27a9bd613a3f654
push id24373
push userryanvm@gmail.com
push dateThu, 28 Feb 2013 01:36:21 +0000
treeherdermozilla-central@8cb9d6981978 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstaras
bugs844146
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 844146 - make JS and C++ codepaths for adding histogram values identical; r=taras
toolkit/components/telemetry/Telemetry.cpp
--- a/toolkit/components/telemetry/Telemetry.cpp
+++ b/toolkit/components/telemetry/Telemetry.cpp
@@ -638,20 +638,17 @@ JSHistogram_Add(JSContext *cx, unsigned 
 
   if (TelemetryImpl::CanRecord()) {
     JSObject *obj = JS_THIS_OBJECT(cx, vp);
     if (!obj) {
       return JS_FALSE;
     }
 
     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;
 }
 
 JSBool
 JSHistogram_Snapshot(JSContext *cx, unsigned argc, jsval *vp)
 {
   JSObject *obj = JS_THIS_OBJECT(cx, vp);