Skip to content
Snippets Groups Projects
user avatar
Daniel Holbert authored
Bug 1890514: Null-check 'view' before using it, in nsTreeBodyFrame::RemoveImageCacheEntry.  a=dmeehan

If it's null, we'll now just take the existing something-failed early-return codepath.

The 'view' local variable here is really just an alias for mView, and we have
null-checks for mView elsewhere, so it's conceivable that it could be null when
we get to this point. (And we have a low but nonzero level of crash volume for
folks hitting a null-deref on this line, which seems to confirm that it is
occasionally null here.)

I'm not including a test since I'm not sure how to trigger the conditions
required to crash in this way.  But the change is pretty trivial and clearly
a step in the direction of safety-against-crashing.

Original Revision: https://phabricator.services.mozilla.com/D207817

Differential Revision: https://phabricator.services.mozilla.com/D208379
d06e1650
History
user avatar d06e1650