diff options
author | Moonchild <mcwerewolf@wolfbeast.com> | 2019-01-31 14:49:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-31 14:49:35 +0100 |
commit | fecab2c542df1e1aed5c9cb9ef45d113533c1dee (patch) | |
tree | db024cf75b8c7196c918bba2c100021556604c5f /js/src/jscompartment.cpp | |
parent | aa28523a553f5e2553c781081eb21715aedb7eaf (diff) | |
parent | 493c956d8de0fdb763851d9c12cfd248776b80b8 (diff) | |
download | UXP-fecab2c542df1e1aed5c9cb9ef45d113533c1dee.tar UXP-fecab2c542df1e1aed5c9cb9ef45d113533c1dee.tar.gz UXP-fecab2c542df1e1aed5c9cb9ef45d113533c1dee.tar.lz UXP-fecab2c542df1e1aed5c9cb9ef45d113533c1dee.tar.xz UXP-fecab2c542df1e1aed5c9cb9ef45d113533c1dee.zip |
Merge pull request #952 from adeshkp/remove-telemetry-js
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() { |