From e900271beaafbece021aec1b8458b86ebec9d3fb Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 4 Mar 2021 16:25:30 -0800 Subject: [PATCH] chore: might_have_observers has been removed Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2667839 --- shell/browser/api/electron_api_web_contents.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 639de8f3b086..acf560fb78ff 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -338,7 +338,7 @@ class WebContents : public gin::Wrappable, } 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); }