From ba4893c248b3f19c55dcc57e2acc31aabce04ad1 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 27 Jun 2022 10:28:35 +0200 Subject: [PATCH] refactor: load webFrame via process._linkedBinding in security-warnings.ts (#34735) --- lib/renderer/security-warnings.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/renderer/security-warnings.ts b/lib/renderer/security-warnings.ts index 30cb0cc63b6d..0aadfb632d19 100644 --- a/lib/renderer/security-warnings.ts +++ b/lib/renderer/security-warnings.ts @@ -1,7 +1,8 @@ -import { webFrame } from 'electron'; import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal'; import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages'; +const { mainFrame: webFrame } = process._linkedBinding('electron_renderer_web_frame'); + let shouldLog: boolean | null = null; const { platform, execPath, env } = process;