refactor: prevent consistent early exception (#24191)
* refactor: prevent consistent early exception * Use _linkedBinding where possible * Remove dead electronBinding
This commit is contained in:
parent
4c77fe318d
commit
659e79fc08
78 changed files with 134 additions and 145 deletions
|
@ -1,5 +1,5 @@
|
|||
const { hasSwitch } = process.electronBinding('command_line');
|
||||
const binding = process.electronBinding('context_bridge');
|
||||
const { hasSwitch } = process._linkedBinding('electron_common_command_line');
|
||||
const binding = process._linkedBinding('electron_renderer_context_bridge');
|
||||
|
||||
const contextIsolationEnabled = hasSwitch('context-isolation');
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { invokeSync } from '../ipc-renderer-internal-utils';
|
||||
import { deprecate } from 'electron';
|
||||
|
||||
const binding = process.electronBinding('crash_reporter');
|
||||
const binding = process._linkedBinding('electron_renderer_crash_reporter');
|
||||
|
||||
export default {
|
||||
start (options: Electron.CrashReporterStartOptions) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal';
|
||||
import { deserialize } from '@electron/internal/common/type-utils';
|
||||
|
||||
const { hasSwitch } = process.electronBinding('command_line');
|
||||
const { hasSwitch } = process._linkedBinding('electron_common_command_line');
|
||||
|
||||
const enableStacks = hasSwitch('enable-api-filtering-logging');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { EventEmitter } from 'events';
|
||||
|
||||
const { ipc } = process.electronBinding('ipc');
|
||||
const { ipc } = process._linkedBinding('electron_renderer_ipc');
|
||||
|
||||
const internal = false;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const v8Util = process.electronBinding('v8_util');
|
||||
const v8Util = process._linkedBinding('electron_common_v8_util');
|
||||
|
||||
const enableRemoteModule = v8Util.getHiddenValue<boolean>(global, 'enableRemoteModule');
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import type { BrowserWindow, WebContents } from 'electron/main';
|
|||
import { browserModuleNames } from '@electron/internal/browser/api/module-names';
|
||||
import { commonModuleList } from '@electron/internal/common/api/module-list';
|
||||
|
||||
const v8Util = process.electronBinding('v8_util');
|
||||
const { hasSwitch } = process.electronBinding('command_line');
|
||||
const { NativeImage } = process.electronBinding('native_image');
|
||||
const v8Util = process._linkedBinding('electron_common_v8_util');
|
||||
const { hasSwitch } = process._linkedBinding('electron_common_command_line');
|
||||
const { NativeImage } = process._linkedBinding('electron_common_native_image');
|
||||
|
||||
const callbacksRegistry = new CallbacksRegistry();
|
||||
const remoteObjectCache = new Map();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { EventEmitter } from 'events';
|
||||
|
||||
const binding = process.electronBinding('web_frame');
|
||||
const binding = process._linkedBinding('electron_renderer_web_frame');
|
||||
|
||||
class WebFrame extends EventEmitter {
|
||||
constructor (public context: Window) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue