Skip to content

Commit

Permalink
Bug 1806410 - Allow sending crash pings for all processes except for …
Browse files Browse the repository at this point in the history
…testing-only ones r=chutten

Differential Revision: https://phabricator.services.mozilla.com/D167155
  • Loading branch information
gabrielesvelto committed Jan 24, 2023
1 parent 6cb27ee commit c4ac753
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
19 changes: 13 additions & 6 deletions toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,19 @@ add_task(async function test_process_ping() {
Assert.ok(!m.isPingAllowed(42));
Assert.ok(!m.isPingAllowed(null));
Assert.ok(!m.isPingAllowed("default"));

Assert.ok(!m.isPingAllowed("main"));
Assert.ok(!m.isPingAllowed("ipdlunittest"));
Assert.ok(!m.isPingAllowed("gmplugin"));
Assert.ok(!m.isPingAllowed("remotesandboxbroker"));
Assert.ok(!m.isPingAllowed("forkserver"));
Assert.ok(!m.isPingAllowed("tab"));

Assert.ok(m.isPingAllowed("content"));
Assert.ok(m.isPingAllowed("forkserver"));
Assert.ok(m.isPingAllowed("gmplugin"));
Assert.ok(m.isPingAllowed("gpu"));
Assert.ok(m.isPingAllowed("main"));
Assert.ok(m.isPingAllowed("rdd"));
Assert.ok(m.isPingAllowed("sandboxbroker"));
Assert.ok(m.isPingAllowed("socket"));
Assert.ok(m.isPingAllowed("utility"));
Assert.ok(m.isPingAllowed("vr"));
});

// Unsubmitted dump files on disk are detected properly.
Expand Down Expand Up @@ -697,16 +700,20 @@ add_task(async function test_addCrash() {
add_task(async function test_child_process_crash_ping() {
let m = await getManager();
const EXPECTED_PROCESSES = [
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_GMPLUGIN],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_GPU],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_VR],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_RDD],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_SOCKET],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_REMOTESANDBOXBROKER],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_FORKSERVER],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_UTILITY],
];

const UNEXPECTED_PROCESSES = [
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_GMPLUGIN],
m.processTypes[Ci.nsIXULRuntime.PROCESS_TYPE_IPDLUNITTEST],
null,
12, // non-string process type
];
Expand Down
6 changes: 5 additions & 1 deletion toolkit/components/telemetry/Histograms.json
Original file line number Diff line number Diff line change
Expand Up @@ -13582,7 +13582,11 @@
"socket-crash",
"socket-hang",
"utility-crash",
"utility-hang"
"utility-hang",
"sandboxbroker-crash",
"sandboxbroker-hang",
"forkserver-crash",
"forkserver-hang"
],
"releaseChannelCollection": "opt-out",
"description": "An attempt to submit a crash. Keyed on the CrashManager Crash.type."
Expand Down
2 changes: 1 addition & 1 deletion xpcom/build/gen_process_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def main(output):
output.write(
"""\
/* THIS FILE IS GENERATED BY GeckoProcessTypes - DO NOT EDIT */
/* THIS FILE IS GENERATED BY gen_process_types.py - DO NOT EDIT */
"""
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"Browser",
"Browser",
"DEFAULT",
False,
True,
),
GeckoProcessType(
2,
Expand Down Expand Up @@ -121,7 +121,7 @@
"GMPlugin",
"GmpPlugin",
"GMPLUGIN",
False,
True,
),
GeckoProcessType(
5,
Expand Down Expand Up @@ -176,7 +176,7 @@
"RemoteSandboxBroker",
"RemoteSandboxBroker",
"REMOTESANDBOXBROKER",
False,
True,
),
GeckoProcessType(
10,
Expand All @@ -187,7 +187,7 @@
"ForkServer",
"ForkServer",
"FORKSERVER",
False,
True,
),
GeckoProcessType(
11,
Expand Down

0 comments on commit c4ac753

Please sign in to comment.