From 17c00954bd996c1233551fabdabff683cc8eb392 Mon Sep 17 00:00:00 2001 From: "trop[bot]" Date: Wed, 9 Jan 2019 15:14:40 -0800 Subject: [PATCH] fix: properly determine if WebContents is offscreen in WebContentsDelegate (backport: 3-1-x) (#16341) --- 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 53503d56383..98b1a017755 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -163,7 +163,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(brightray::InspectableWebContents::Create(