Open Bug 1901639 Opened 4 months ago Updated 4 months ago

Add crash annotation with the page URL in various parent-process print functions (e.g. `RecvProcessPage`)

Categories

(Core :: Printing: Output, enhancement)

enhancement

Tracking

()

People

(Reporter: dholbert, Unassigned)

Details

In bug 1901043, we've got a parent-process crash that's happening while printing certain pages, but we're not getting the associated page URL (despite users potentially opting in to sending it), because the URL isn't associated with the parent process.

That makes it harder to reason about what pages are triggering this crash, and harder to reproduce/investigate.

To address this (for this crash & future similar crashes), we should add a crash annotation with the page URL in all of the print functions where we're doing some rendering work on behalf of the content process -- e.g. in RemotePrintJobParent::RecvProcessPage() which is in the backtrace of bug 1901043's crashes.

Here's where WebRender code seems to do this, for inspiration/possible-copypasting:
https://searchfox.org/mozilla-central/rev/46d0387f0b582f00a5722c20d4e6b8693793631b/gfx/layers/wr/WebRenderBridgeParent.cpp#1170,1192-1193

mozilla::ipc::IPCResult WebRenderBridgeParent::RecvSetDisplayList(
...
    CrashReporter::RecordAnnotationNSCString(CrashReporter::Annotation::URL,
                                             aTxnURL);

Note that this reference WebRender API has the page's URL (aTxnURL) as a parameter already. We don't have that in RecvProcessPage, so we might need to add it as a new parameter to the ipdl there, if we don't already have it handy.

Severity: -- → S3
Type: defect → enhancement
Severity: S3 → --

(We'll also need to do this in a RAII sort of way, probably -- i.e. we'll only want our crash annotation to take effect for the duration of our RecvProcessPage call, and we don't want it to persist and show up in crash reports for whatever other parent-process work happens next.)

You need to log in before you can comment on or make changes to this bug.