Backed out changeset c8b0d74c8c41 (bug 1352496) for eslint failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 19 Apr 2017 20:38:39 -0400
changeset 395941 22a981da392681c112d4dd72e4ce7d042905a1f5
parent 395940 9edc76120a27a6c407e9f45d0b7a9b0877b80f57
child 395942 549670514df6371bd80ffe13afb4a187f20a016d
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1352496
milestone54.0
backs outc8b0d74c8c41a6040f3d5fb23d8080ed7e49440c
Backed out changeset c8b0d74c8c41 (bug 1352496) for eslint failures.
ipc/glue/CrashReporterHost.cpp
toolkit/components/crashes/CrashManager.jsm
toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
toolkit/components/telemetry/docs/data/crash-ping.rst
--- a/ipc/glue/CrashReporterHost.cpp
+++ b/ipc/glue/CrashReporterHost.cpp
@@ -136,18 +136,17 @@ public:
       NS_LITERAL_STRING("Minidump analysis"));
     Unused << NS_WARN_IF(NS_FAILED(rv));
   }
 
   NS_IMETHOD Run() override
   {
     MOZ_ASSERT(!NS_IsMainThread());
 
-    if (mProcessType == nsICrashService::PROCESS_TYPE_CONTENT ||
-        mProcessType == nsICrashService::PROCESS_TYPE_GPU) {
+    if (mProcessType == nsICrashService::PROCESS_TYPE_CONTENT) {
       CrashReporter::RunMinidumpAnalyzer(mChildDumpID);
     }
 
     // Make a copy of these so we can copy them into the runnable lambda
     int32_t processType = mProcessType;
     int32_t crashType = mCrashType;
     nsString childDumpID(mChildDumpID);
     nsCOMPtr<nsIAsyncShutdownBlocker> self(this);
--- a/toolkit/components/crashes/CrashManager.jsm
+++ b/toolkit/components/crashes/CrashManager.jsm
@@ -450,19 +450,18 @@ this.CrashManager.prototype = Object.fre
 
       let deferred = this._crashPromises.get(id);
 
       if (deferred) {
         this._crashPromises.delete(id);
         deferred.resolve();
       }
 
-      // Send a telemetry ping for each non-main process crash
-      if (processType === this.PROCESS_TYPE_CONTENT ||
-          processType === this.PROCESS_TYPE_GPU) {
+      // Send a telemetry ping for each content process crash
+      if (processType === this.PROCESS_TYPE_CONTENT) {
         this._sendCrashPing(id, processType, date, metadata);
       }
    }.bind(this));
 
     return promise;
   },
 
   /**
--- a/toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
+++ b/toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
@@ -453,65 +453,36 @@ add_task(function* test_addCrash() {
 
   crash = map.get("changing-item");
   Assert.ok(!!crash);
   Assert.equal(crash.crashDate, DUMMY_DATE_2);
   Assert.equal(crash.type, m.PROCESS_TYPE_CONTENT + "-" + m.CRASH_TYPE_HANG);
   Assert.ok(crash.isOfType(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_HANG));
 });
 
-add_task(function* test_child_process_crash_ping() {
-  let m = yield getManager();
-  const EXPECTED_PROCESSES = [
-    m.PROCESS_TYPE_CONTENT,
-    m.PROCESS_TYPE_GPU,
-  ];
-
-  const UNEXPECTED_PROCESSES = [
-    m.PROCESS_TYPE_PLUGIN,
-    m.PROCESS_TYPE_GMPLUGIN,
-    null,
-    12, // non-string process type
-  ];
-
+add_task(function* test_content_crash_ping() {
   let ac = new TelemetryArchiveTesting.Checker();
   yield ac.promiseInit();
 
-  // Add a child-process crash for each allowed process type.
-  for (let p of EXPECTED_PROCESSES) {
-    // Generate a ping.
-    let id = yield m.createDummyDump();
-    yield m.addCrash(p, m.CRASH_TYPE_CRASH, id, DUMMY_DATE, {
-      StackTraces: stackTraces,
-      MinidumpSha256Hash: sha256Hash,
-      ThisShouldNot: "end-up-in-the-ping"
-    });
-    yield m._pingPromise;
-
-    Assert.equal(found.payload.metadata.ThisShouldNot, undefined,
-                 "Non-whitelisted fields should be filtered out");
-  }
+  let m = yield getManager();
+  let id = yield m.createDummyDump();
+  yield m.addCrash(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_CRASH, id, DUMMY_DATE, {
+    StackTraces: stackTraces,
+    ThisShouldNot: "end-up-in-the-ping"
+  });
+  yield m._pingPromise;
 
-  // Check that we don't generate a crash ping for invalid/unexpected process
-  // types.
-  for (let p of UNEXPECTED_PROCESSES) {
-    let id = yield m.createDummyDump();
-    yield m.addCrash(p, m.CRASH_TYPE_CRASH, id, DUMMY_DATE, {
-      StackTraces: stackTraces,
-      MinidumpSha256Hash: sha256Hash,
-      ThisShouldNot: "end-up-in-the-ping"
-    });
-    yield m._pingPromise;
-
-    // Check that we didn't receive any new ping.
-    let found = yield ac.promiseFindPing("crash", [
-      [["payload", "crashId"], id],
-    ]);
-    Assert.ok(!found, "No telemetry ping must be submitted for invalid process types");
-  }
+  let found = yield ac.promiseFindPing("crash", [
+    [["payload", "crashId"], id],
+    [["payload", "processType"], m.PROCESS_TYPE_CONTENT],
+    [["payload", "stackTraces", "status"], "OK"],
+  ]);
+  Assert.ok(found, "Telemetry ping submitted for content crash");
+  Assert.equal(found.payload.metadata.ThisShouldNot, undefined,
+               "Non-whitelisted fields should be filtered out");
 });
 
 add_task(function* test_generateSubmissionID() {
   let m = yield getManager();
 
   const SUBMISSION_ID_REGEX =
     /^(sub-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
   let id = m.generateSubmissionID();
--- a/toolkit/components/telemetry/docs/data/crash-ping.rst
+++ b/toolkit/components/telemetry/docs/data/crash-ping.rst
@@ -1,19 +1,19 @@
 
 "crash" ping
 ============
 
-This ping is captured after the main Firefox process crashes or after a child process
+This ping is captured after the main Firefox process crashes or after a content
 process crashes, whether or not the crash report is submitted to
 crash-stats.mozilla.org. It includes non-identifying metadata about the crash.
 
 This ping is sent either by the ```CrashManager``` or by the crash reporter
 client. The ```CrashManager``` is responsible for sending crash pings for the
-child processes crashes, which are sent right after the crash is detected,
+content process crashes, which are sent right after the crash is detected,
 as well as for main process crashes, which are sent after Firefox restarts
 successfully. The crash reporter client sends crash pings only for main process
 crashes whether or not the user also reports the crash. The crash reporter
 client will not send the crash ping if telemetry has been disabled in Firefox
 though.
 
 The environment block that is sent with this ping varies: if Firefox was running long enough to record the environment block before the crash, then the environment at the time of the crash will be recorded and ``hasCrashEnvironment`` will be true. If Firefox crashed before the environment was recorded, ``hasCrashEnvironment`` will be false and the recorded environment will be the environment at time of submission.
 
@@ -82,18 +82,16 @@ are sent only for the ones below:
 
 +---------------+---------------------------------------------------+
 | Type          | Description                                       |
 +===============+===================================================+
 | main          | Main process, also known as the browser process   |
 +---------------+---------------------------------------------------+
 | content       | Content process                                   |
 +---------------+---------------------------------------------------+
-| gpu           | GPU process                                       |
-+---------------+---------------------------------------------------+
 
 Stack Traces
 ------------
 
 The crash ping may contain a ``stackTraces`` field which has been populated
 with stack traces for all threads in the crashed process. The format of this
 field is similar to the one used by Socorro for representing a crash. The main
 differences are that redundant fields are not stored and that the module a