Bug 680508: disable telemetry for content-processes r=glandium
authorTaras Glek <tglek@mozilla.com>
Mon, 22 Aug 2011 11:38:08 -0700
changeset 75680 6fd03fb1badabcd981f243db25b75ea595b874f7
parent 75679 144ee7f1e5ad9a45ec8090b2728b2f46fadd1045
child 75681 408b90991d1793b1fe70fb367d34f1dd21d7e088
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersglandium
bugs680508
milestone9.0a1
Bug 680508: disable telemetry for content-processes r=glandium
toolkit/components/telemetry/Telemetry.cpp
--- a/toolkit/components/telemetry/Telemetry.cpp
+++ b/toolkit/components/telemetry/Telemetry.cpp
@@ -254,17 +254,17 @@ WrapAndReturnHistogram(Histogram *h, JSC
     return NS_ERROR_FAILURE;
   *ret = OBJECT_TO_JSVAL(obj);
   return (JS_SetPrivate(cx, obj, h)
           && JS_DefineFunction (cx, obj, "add", JSHistogram_Add, 1, 0)
           && JS_DefineFunction (cx, obj, "snapshot", JSHistogram_Snapshot, 1, 0)) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 TelemetryImpl::TelemetryImpl():
-mCanRecord(true)
+mCanRecord(XRE_GetProcessType() == GeckoProcessType_Default)
 {
   mHistogramMap.Init(Telemetry::HistogramCount);
 }
 
 TelemetryImpl::~TelemetryImpl() {
   mHistogramMap.Clear();
 }