Skip to content

Commit f9b5c78

Browse files
committed
Define crash reports
1 parent dae1366 commit f9b5c78

File tree

2 files changed

+36
-5
lines changed

2 files changed

+36
-5
lines changed

EXPLAINER.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ An [intervention](https://github.com/WICG/interventions/blob/master/README.md) o
8181
```
8282

8383
### Crashes ###
84-
A crash report indicates that the user was unable to continue using the page because the browser (or one of it's processes necessary for the page) crashed. For security reasons, no details of the crash are communicated except (optionally) the type of crash (such as "oom") and/or a unique identifier which can be supplied to the browser vendor.
84+
A crash report indicates that the user was unable to continue using the page because the browser (or one of its processes necessary for the page) crashed. For security reasons, no details of the crash are communicated except (optionally) the type of crash (such as "oom") and a unique identifier which can be supplied to the browser vendor.
8585

8686
```json
8787
{
@@ -90,14 +90,14 @@ A crash report indicates that the user was unable to continue using the page bec
9090
"url": "https://example.com/",
9191
"body": {
9292
"crashId": "c2dd3217-24f5-4bee-b74d-99bd055e7edb",
93-
"type": "oom"
93+
"reason": "oom"
9494
}
9595
}
9696
```
9797

9898
The report has the following properties:
9999
- `crashId`: A unique identifier. This identifier will not be meaningful to developers directly, but it can potentially be supplied to the browser vendor for more details.
100-
- `type`: A more specific classification of the type of crash that occured. Currently, the only valid type is "oom" (omitted otherwise), indicating an out-of-memory crash.
100+
- `reason`: A more specific classification of the type of crash that occured. Currently, the only valid type is "oom" (omitted otherwise), indicating an out-of-memory crash.
101101

102102
## ReportingObserver - Observing reports from JavaScript
103103
In addition to (or even instead of) having reports delivered to an endpoint, it can be convenient to be informed of reports from within the page's JavaScript (eg. for analytics libraries which have no way to influence HTTP headers). This doesn't make sense or isn't possible for all reports (eg. crashes), but is most useful for reports generated as a direct result of something the page's script has done (such as a deprecation warning).

index.src.html

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ <h3 id="concept-report-type">Report Type</h3>
312312
When a <a>report type</a> is defined (in this spec or others), it can be
313313
specified to be <dfn>visible to <code>ReportingObserver</code>s</dfn>, meaning
314314
that <a>reports</a> of that type can be observed by a <a>reporting
315-
observer</a>. By default, <a>report types</a> are not <a>visible to
316-
<code>ReportingObserver</code>s</a>.
315+
observer</a>. By default, <a>report types</a> are not <a>visible to
316+
<code>ReportingObserver</code>s</a>.
317317

318318
Note: See [[#deprecation-report]] as an example <a>report type</a> definition.
319319

@@ -1269,6 +1269,37 @@ <h3 id="intervention-report">Intervention</h3>
12691269
}
12701270
</pre>
12711271
</div>
1272+
1273+
<h3 id="crash-report">Crash</h3>
1274+
1275+
<dfn>Crash reports</dfn> indicate that the user was unable to continue using
1276+
the page because the browser (or one of its processes necessary for the page)
1277+
crashed. For security reasons, no details of the crash are communicated except
1278+
for and a unique identifier (which can be interpreted by the browser vendor),
1279+
and optionally the reason for the crash (such as "oom").
1280+
1281+
<a>Crash reports</a> have the <a>report type</a> "crash".
1282+
1283+
<a>Crash reports</a> are <a>visible to <code>ReportingObserver</code>s</a>.
1284+
1285+
<pre class="idl">
1286+
interface CrashReportBody : ReportBody {
1287+
readonly attribute DOMString crashId;
1288+
readonly attribute DOMString? reason;
1289+
};
1290+
</pre>
1291+
1292+
An <a>crash report</a>'s [=report/body=], represented in JavaScript by
1293+
{{CrashReportBody}}, contains the following fields:
1294+
1295+
- <dfn for="CrashReportBody">crashId</dfn>: A unique identifier. This
1296+
identifier will not be meaningful to developers directly, but it can
1297+
potentially be supplied to the browser vendor for more details.
1298+
1299+
- <dfn for="CrashReportBody">reason</dfn>: A more specific classification of
1300+
the type of crash that occured. Currently, the only valid
1301+
[=CrashReportBody/reason=] is "oom" (omitted otherwise), indicating an
1302+
out-of-memory crash.
12721303
</section>
12731304

12741305
<section>

0 commit comments

Comments
 (0)