зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1715542 - Give Glean and GleanPings a BackstagePass r=janerik,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D131824
This commit is contained in:
Родитель
048171d4e1
Коммит
a1187db712
|
@ -37,8 +37,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
"browser.engagement.recent_visited_origins.expiry"
|
||||
);
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
|
||||
// The upper bound for the count of the visited unique domain names.
|
||||
const MAX_UNIQUE_VISITED_DOMAINS = 100;
|
||||
|
||||
|
|
|
@ -83,8 +83,6 @@
|
|||
#include "mozilla/dom/XMLSerializerBinding.h"
|
||||
#include "mozilla/dom/FormDataBinding.h"
|
||||
#include "mozilla/dom/nsCSPContext.h"
|
||||
#include "mozilla/glean/bindings/Glean.h"
|
||||
#include "mozilla/glean/bindings/GleanPings.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "mozilla/DeferredFinalize.h"
|
||||
#include "mozilla/ExtensionPolicyService.h"
|
||||
|
@ -967,10 +965,6 @@ bool xpc::GlobalProperties::Parse(JSContext* cx, JS::HandleObject obj) {
|
|||
indexedDB = true;
|
||||
} else if (JS_LinearStringEqualsLiteral(nameStr, "isSecureContext")) {
|
||||
isSecureContext = true;
|
||||
} else if (JS_LinearStringEqualsLiteral(nameStr, "Glean")) {
|
||||
glean = true;
|
||||
} else if (JS_LinearStringEqualsLiteral(nameStr, "GleanPings")) {
|
||||
gleanPings = true;
|
||||
#ifdef MOZ_WEBRTC
|
||||
} else if (JS_LinearStringEqualsLiteral(nameStr, "rtcIdentityProvider")) {
|
||||
rtcIdentityProvider = true;
|
||||
|
@ -1150,11 +1144,6 @@ bool xpc::GlobalProperties::DefineInXPCComponents(JSContext* cx,
|
|||
if (indexedDB && !IndexedDatabaseManager::DefineIndexedDB(cx, obj))
|
||||
return false;
|
||||
|
||||
if (glean && !mozilla::glean::Glean::DefineGlean(cx, obj)) return false;
|
||||
if (gleanPings && !mozilla::glean::GleanPings::DefineGleanPings(cx, obj)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return Define(cx, obj);
|
||||
}
|
||||
|
||||
|
|
|
@ -551,6 +551,12 @@ nsresult InitClassesWithNewWrappedGlobal(JSContext* aJSContext,
|
|||
if (!JS_DefineProfilingFunctions(aJSContext, global)) {
|
||||
return UnexpectedFailure(NS_ERROR_OUT_OF_MEMORY);
|
||||
}
|
||||
if (aPrincipal->IsSystemPrincipal()) {
|
||||
if (!glean::Glean::DefineGlean(aJSContext, global) ||
|
||||
!glean::GleanPings::DefineGleanPings(aJSContext, global)) {
|
||||
return UnexpectedFailure(NS_ERROR_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
aNewGlobal.set(global);
|
||||
|
|
|
@ -2270,8 +2270,6 @@ struct GlobalProperties {
|
|||
bool indexedDB : 1;
|
||||
bool isSecureContext : 1;
|
||||
bool rtcIdentityProvider : 1;
|
||||
bool glean : 1;
|
||||
bool gleanPings : 1;
|
||||
|
||||
private:
|
||||
bool Define(JSContext* cx, JS::HandleObject obj);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const TELEMETRY_SERVER_PREF = "toolkit.telemetry.server";
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
Cu.importGlobalProperties(["Glean", "GleanPings"]);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
|
||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var cpuThreadCount;
|
||||
|
|
|
@ -27,8 +27,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
TelemetryScheduler: "resource://gre/modules/TelemetryScheduler.jsm",
|
||||
});
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
|
||||
const Utils = TelemetryUtils;
|
||||
|
||||
const myScope = this;
|
||||
|
|
|
@ -9,8 +9,6 @@ const { TelemetrySession } = ChromeUtils.import(
|
|||
"resource://gre/modules/TelemetrySession.jsm"
|
||||
);
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
|
||||
function tick(aHowMany) {
|
||||
for (let i = 0; i < aHowMany; i++) {
|
||||
Services.obs.notifyObservers(null, "user-interaction-active");
|
||||
|
|
|
@ -44,8 +44,6 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
|
|||
return new ConsoleAPI(consoleOptions);
|
||||
});
|
||||
|
||||
Cu.importGlobalProperties(["Glean", "GleanPings"]);
|
||||
|
||||
const backgroundTaskTimeoutSec = Services.prefs.getIntPref(
|
||||
"app.update.background.timeoutSec",
|
||||
10 * 60
|
||||
|
|
|
@ -48,8 +48,6 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"nsIApplicationUpdateService"
|
||||
);
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
|
||||
// We may want to change the definition of the task over time. When we do this,
|
||||
// we need to remove and re-register the task. We will make sure this happens
|
||||
// by storing the installed version number of the task to a pref and comparing
|
||||
|
|
|
@ -17,8 +17,6 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"nsIApplicationUpdateService"
|
||||
);
|
||||
|
||||
Cu.importGlobalProperties(["Glean"]);
|
||||
|
||||
add_task(function test_setup() {
|
||||
// FOG needs a profile directory to put its data in.
|
||||
do_get_profile();
|
||||
|
|
|
@ -191,6 +191,8 @@ module.exports = {
|
|||
GamepadHapticActuator: false,
|
||||
GamepadPose: false,
|
||||
GamepadServiceTest: false,
|
||||
Glean: false,
|
||||
GleanPings: false,
|
||||
Grid: false,
|
||||
GridArea: false,
|
||||
GridDimension: false,
|
||||
|
|
Загрузка…
Ссылка в новой задаче