Commit 9d316167 authored by Tom Schuster's avatar Tom Schuster
Browse files

Bug 1536860 - Telemetry for deprecated Array generics. r=jorendorff datareview=chutten

Differential Revision: https://phabricator.services.mozilla.com/D24208

--HG--
extra : moz-landing-system : lando
parent 0be4c58b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@ enum {
  JS_TELEMETRY_GC_MARK_RATE,
  JS_TELEMETRY_PRIVILEGED_PARSER_COMPILE_LAZY_AFTER_MS,
  JS_TELEMETRY_WEB_PARSER_COMPILE_LAZY_AFTER_MS,
  JS_TELEMETRY_DEPRECATED_ARRAY_GENERICS,
  JS_TELEMETRY_END
};

+4 −0
Original line number Diff line number Diff line
@@ -2088,6 +2088,10 @@ static bool intrinsic_WarnDeprecatedMethod(JSContext* cx, unsigned argc,
      return false;
    }

    if (!cx->realm()->isProbablySystemCode()) {
      cx->runtime()->addTelemetry(JS_TELEMETRY_DEPRECATED_ARRAY_GENERICS, id);
    }

    cx->realm()->warnedAboutArrayGenericsMethods |= mask;
  }

+3 −0
Original line number Diff line number Diff line
@@ -2750,6 +2750,9 @@ static void AccumulateTelemetryCallback(int id, uint32_t sample,
    case JS_TELEMETRY_GC_MARK_RATE:
      Telemetry::Accumulate(Telemetry::GC_MARK_RATE, sample);
      break;
    case JS_TELEMETRY_DEPRECATED_ARRAY_GENERICS:
      Telemetry::Accumulate(Telemetry::JS_DEPRECATED_ARRAY_GENERICS, sample);
      break;
    default:
      MOZ_ASSERT_UNREACHABLE("Unexpected JS_TELEMETRY id");
  }
+9 −0
Original line number Diff line number Diff line
@@ -1033,6 +1033,15 @@
    "n_buckets": 10,
    "description": "Time elapsed between the moment a function is lazy-parsed (end of parsing of the ScriptSource) and the moment it is recompiled as non-lazy (start of compilation), in milliseconds, for web code."
  },
  "JS_DEPRECATED_ARRAY_GENERICS": {
    "record_in_processes": ["content"],
    "alert_emails": ["jdemooij@mozilla.com"],
    "expires_in_version": "74",
    "bug_numbers": [1536860],
    "kind": "enumerated",
    "n_values": 20,
    "description": "A array generic function was called, like Array.forEach etc. See ARRAY_GENERICS_* defines in SelfHostingDefines.h for the meaning of values."
  },
  "XUL_CACHE_DISABLED": {
    "record_in_processes": ["main", "content"],
    "expires_in_version": "default",