From 1089dd36b38b94224fca1a367d4c2b5d99a0d873 Mon Sep 17 00:00:00 2001 From: "trop[bot]" Date: Thu, 10 Jan 2019 10:35:01 -0500 Subject: [PATCH] fix: properly determine if WebContents is offscreen in WebContentsDelegate (#16340) --- 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 21752607a9910..e137b7bb63447 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(brightray::InspectableWebContents::Create(