From 744f737cba67cd6f59ea598aa00795fa4375a929 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Wed, 9 Jan 2019 09:55:45 -0800 Subject: [PATCH] fix: properly determine if WebContents is offscreen in WebContentsDelegate (#16329) --- atom/browser/common_web_contents_delegate.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 01f8c8b735f0..02c3ebee3a68 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -187,7 +187,7 @@ void CommonWebContentsDelegate::InitWithWebContents( // Determien whether the WebContents is offscreen. auto* web_preferences = WebContentsPreferences::From(web_contents); offscreen_ = - !web_preferences || web_preferences->IsEnabled(options::kOffscreen); + web_preferences && web_preferences->IsEnabled(options::kOffscreen); // Create InspectableWebContents. web_contents_.reset(InspectableWebContents::Create(