build: fix building with enable_desktop_capturer = false (#30372)

This commit is contained in:
Milan Burda 2021-08-04 00:12:46 +02:00 committed by GitHub
parent 8179349625
commit 1c29734c91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,7 @@
#include "base/strings/string_split.h"
#include "components/crash/core/common/crash_key.h"
#include "content/public/common/content_switches.h"
#include "electron/buildflags/buildflags.h"
#include "electron/fuses.h"
#include "shell/common/electron_constants.h"
#include "shell/common/options_switches.h"
@ -186,8 +187,10 @@ void SetCrashKeyForGinWrappable(gin::WrapperInfo* info) {
crash_location = "Notification";
else if (info == &electron::api::Cookies::kWrapperInfo)
crash_location = "Cookies";
#if BUILDFLAG(ENABLE_DESKTOP_CAPTURER)
else if (info == &electron::api::DesktopCapturer::kWrapperInfo)
crash_location = "DesktopCapturer";
#endif
else if (info == &electron::api::NetLog::kWrapperInfo)
crash_location = "NetLog";
else if (info == &electron::api::NativeImage::kWrapperInfo)