Just looking at the stack, it kind of looks like mPresShell should be rooted on this line: `EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status);`. There's an earlier scope in this method that holds a strong stack ref to the pres shell with the comment "Hold strong ref because this could conceivably run script" but I'm not sure why it wouldn't be needed here.
Bug 1709976 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Just looking at the stack, it kind of looks like mPresShell should be rooted on this line in nsDocumentViewer::LoadComplete: `EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status);`. There's an earlier scope in this method that holds a strong stack ref to the pres shell with the comment "Hold strong ref because this could conceivably run script" but I'm not sure why it wouldn't be needed here.