summaryrefslogtreecommitdiff
path: root/js/src/jscompartment.cpp
diff options
context:
space:
mode:
authoradeshkp <adeshkp@users.noreply.github.com>2019-01-30 13:56:07 -0500
committeradeshkp <adeshkp@users.noreply.github.com>2019-01-30 13:56:07 -0500
commit493c956d8de0fdb763851d9c12cfd248776b80b8 (patch)
treee583756e275c3fc2f35948f7eee193aa314e1b35 /js/src/jscompartment.cpp
parent7f992d50e417b0c2f18259ce2353e3ead4870694 (diff)
downloaduxp-493c956d8de0fdb763851d9c12cfd248776b80b8.tar.gz
Remove telemetry leftovers from JS engine.
Diffstat (limited to 'js/src/jscompartment.cpp')
-rw-r--r--js/src/jscompartment.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/js/src/jscompartment.cpp b/js/src/jscompartment.cpp
index 4e4ccdf2a3..a48bb0ffec 100644
--- a/js/src/jscompartment.cpp
+++ b/js/src/jscompartment.cpp
@@ -41,7 +41,6 @@ using namespace js::gc;
using namespace js::jit;
using mozilla::DebugOnly;
-using mozilla::PodArrayZero;
JSCompartment::JSCompartment(Zone* zone, const JS::CompartmentOptions& options = JS::CompartmentOptions())
: creationOptions_(options.creationOptions()),
@@ -91,7 +90,6 @@ JSCompartment::JSCompartment(Zone* zone, const JS::CompartmentOptions& options =
unmappedArgumentsTemplate_(nullptr),
lcovOutput()
{
- PodArrayZero(sawDeprecatedLanguageExtension);
runtime_->numCompartments++;
MOZ_ASSERT_IF(creationOptions_.mergeable(),
creationOptions_.invisibleToDebugger());
@@ -99,8 +97,6 @@ JSCompartment::JSCompartment(Zone* zone, const JS::CompartmentOptions& options =
JSCompartment::~JSCompartment()
{
- reportTelemetry();
-
// Write the code coverage information in a file.
JSRuntime* rt = runtimeFromMainThread();
if (rt->lcovOutput.isEnabled())
@@ -1268,39 +1264,6 @@ JSCompartment::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
*privateData += callback(mallocSizeOf, this);
}
-void
-JSCompartment::reportTelemetry()
-{
- // Only report telemetry for web content and add-ons, not chrome JS.
- if (isSystem_)
- return;
-
- // Hazard analysis can't tell that the telemetry callbacks don't GC.
- JS::AutoSuppressGCAnalysis nogc;
-
- int id = creationOptions_.addonIdOrNull()
- ? JS_TELEMETRY_DEPRECATED_LANGUAGE_EXTENSIONS_IN_ADDONS
- : JS_TELEMETRY_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT;
-
- // Call back into Firefox's Telemetry reporter.
- for (size_t i = 0; i < DeprecatedLanguageExtensionCount; i++) {
- if (sawDeprecatedLanguageExtension[i])
- runtime_->addTelemetry(id, i);
- }
-}
-
-void
-JSCompartment::addTelemetry(const char* filename, DeprecatedLanguageExtension e)
-{
- // Only report telemetry for web content and add-ons, not chrome JS.
- if (isSystem_)
- return;
- if (!creationOptions_.addonIdOrNull() && (!filename || strncmp(filename, "http", 4) != 0))
- return;
-
- sawDeprecatedLanguageExtension[e] = true;
-}
-
HashNumber
JSCompartment::randomHashCode()
{