diff options
author | adeshkp <adeshkp@users.noreply.github.com> | 2019-01-30 13:56:07 -0500 |
---|---|---|
committer | adeshkp <adeshkp@users.noreply.github.com> | 2019-01-30 13:56:07 -0500 |
commit | 493c956d8de0fdb763851d9c12cfd248776b80b8 (patch) | |
tree | e583756e275c3fc2f35948f7eee193aa314e1b35 /js/src/jscompartment.cpp | |
parent | 7f992d50e417b0c2f18259ce2353e3ead4870694 (diff) | |
download | UXP-493c956d8de0fdb763851d9c12cfd248776b80b8.tar UXP-493c956d8de0fdb763851d9c12cfd248776b80b8.tar.gz UXP-493c956d8de0fdb763851d9c12cfd248776b80b8.tar.lz UXP-493c956d8de0fdb763851d9c12cfd248776b80b8.tar.xz UXP-493c956d8de0fdb763851d9c12cfd248776b80b8.zip |
Remove telemetry leftovers from JS engine.
Diffstat (limited to 'js/src/jscompartment.cpp')
-rw-r--r-- | js/src/jscompartment.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/js/src/jscompartment.cpp b/js/src/jscompartment.cpp index 4e4ccdf2a..a48bb0ffe 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() { |