Skip to content

Commit

Permalink
Backed out 3 changesets (bug 1620656) for causing bustage at TestGeck…
Browse files Browse the repository at this point in the history
…oView. CLOSED TREE

Backed out changeset af6b36a497e8 (bug 1620656)
Backed out changeset f0b502580ef0 (bug 1620656)
Backed out changeset dd0ce5e4a1bf (bug 1620656)
  • Loading branch information
Butkovits Atila committed Jun 16, 2020
1 parent ddf574e commit e14bf43
Show file tree
Hide file tree
Showing 41 changed files with 4,021 additions and 1,410 deletions.
2 changes: 2 additions & 0 deletions mobile/android/app/geckoview-prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ pref("dom.ipc.keepProcessesAlive.web", 1);
pref("dom.ipc.processCount", 1);
pref("dom.ipc.processPrelaunch.enabled", false);

// Tell Telemetry that we're in GeckoView mode.
pref("toolkit.telemetry.isGeckoViewMode", true);
// Disable the Telemetry Event Ping
pref("toolkit.telemetry.eventping.enabled", false);
// Don't create the hidden window during startup.
Expand Down
7 changes: 7 additions & 0 deletions mobile/android/components/geckoview/GeckoViewStartup.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const { GeckoViewUtils } = ChromeUtils.import(
XPCOMUtils.defineLazyModuleGetters(this, {
ActorManagerParent: "resource://gre/modules/ActorManagerParent.jsm",
EventDispatcher: "resource://gre/modules/Messaging.jsm",
GeckoViewTelemetryController:
"resource://gre/modules/GeckoViewTelemetryController.jsm",
Preferences: "resource://gre/modules/Preferences.jsm",
SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
Services: "resource://gre/modules/Services.jsm",
Expand Down Expand Up @@ -199,6 +201,11 @@ class GeckoViewStartup {
}
);

// This initializes Telemetry for GeckoView only in the parent process.
// The Telemetry initialization for the content process is performed in
// ContentProcessSingleton.js for consistency with Desktop Telemetry.
GeckoViewTelemetryController.setup();

ChromeUtils.import("resource://gre/modules/NotificationDB.jsm");

// Initialize safe browsing module. This is required for content
Expand Down
5 changes: 5 additions & 0 deletions modules/libpref/init/StaticPrefList.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8998,6 +8998,11 @@
value: 2000
mirror: always

- name: toolkit.telemetry.isGeckoViewMode
type: RelaxedAtomicBool
value: false
mirror: always

- name: toolkit.telemetry.geckoview.batchDurationMS
type: RelaxedAtomicUint32
value: 5000
Expand Down
10 changes: 10 additions & 0 deletions toolkit/components/build/components.conf
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,13 @@ if MOZ_HAS_TERMINATOR:
'headers': ['nsTerminator.h'],
},
]

if defined('ENABLE_TESTS'):
Classes += [
{
'cid': '{aaa3f7f2-8ef0-41ec-8d03-aed667cf7fa2}',
'contract_ids': ['@mozilla.org/telemetry/geckoview-testing;1'],
'type': 'TelemetryGeckoViewTestingImpl',
'headers': ['/toolkit/components/telemetry/geckoview/TelemetryGeckoViewTesting.h'],
},
]
10 changes: 10 additions & 0 deletions toolkit/components/processsingleton/ContentProcessSingleton.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const { XPCOMUtils } = ChromeUtils.import(
);

XPCOMUtils.defineLazyModuleGetters(this, {
GeckoViewTelemetryController:
"resource://gre/modules/GeckoViewTelemetryController.jsm",
TelemetryController: "resource://gre/modules/TelemetryController.jsm",
});

Expand All @@ -25,6 +27,14 @@ ContentProcessSingleton.prototype = {
switch (topic) {
case "app-startup": {
Services.obs.addObserver(this, "xpcom-shutdown");
// Initialize Telemetry in the content process: use a different
// controller depending on the platform.
if (
Services.prefs.getBoolPref("toolkit.telemetry.isGeckoViewMode", false)
) {
GeckoViewTelemetryController.setup();
return;
}
// Initialize Firefox Desktop Telemetry.
TelemetryController.observe(null, topic, null);
break;
Expand Down
Loading

0 comments on commit e14bf43

Please sign in to comment.