Issue #1643 - Follow up: Add a null check for mOwner in ResizeObserverNotificationHelper::Unregister

A race condition seemed to exist between tab destruction and un-registering a ResizeObserver resulting in a null deref crash.
The original reporter in Forum Topic 25311 experienced this on msn.com so that was the functional test reference.
This commit is contained in:
Matt A. Tobin 2020-09-29 15:03:13 -04:00 committed by roytam1
commit 7f8852baa3

View file

@ -58,6 +58,12 @@ ResizeObserverNotificationHelper::Register()
void
ResizeObserverNotificationHelper::Unregister()
{
if (!mOwner) {
// We've outlived our owner, so there's nothing registered anymore.
mRegistered = false;
return;
}
if (!mRegistered) {
return;
}