chore: might_have_observers has been removed

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2667839
This commit is contained in:
Samuel Attard 2021-03-04 16:25:30 -08:00
parent 87df2766ba
commit e900271bea

View file

@ -338,7 +338,7 @@ class WebContents : public gin::Wrappable<WebContents>,
}
void RemoveObserver(ExtendedWebContentsObserver* obs) {
// Trying to remove from an empty collection leads to an access violation
if (observers_.might_have_observers())
if (!observers_.empty())
observers_.RemoveObserver(obs);
}