Require Buffer explicitly instead of relying on global
This commit is contained in:
parent
803943bff8
commit
902bd0564e
5 changed files with 5 additions and 0 deletions
|
@ -2,6 +2,7 @@ const {app, ipcMain, webContents, BrowserWindow} = require('electron')
|
||||||
const {getAllWebContents} = process.atomBinding('web_contents')
|
const {getAllWebContents} = process.atomBinding('web_contents')
|
||||||
const renderProcessPreferences = process.atomBinding('render_process_preferences').forAllWebContents()
|
const renderProcessPreferences = process.atomBinding('render_process_preferences').forAllWebContents()
|
||||||
|
|
||||||
|
const {Buffer} = require('buffer')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const url = require('url')
|
const url = require('url')
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
const {Buffer} = require('buffer')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
const {Buffer} = require('buffer')
|
||||||
const electron = require('electron')
|
const electron = require('electron')
|
||||||
const v8Util = process.atomBinding('v8_util')
|
const v8Util = process.atomBinding('v8_util')
|
||||||
const {ipcMain, isPromise, webContents} = electron
|
const {ipcMain, isPromise, webContents} = electron
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
(function () {
|
(function () {
|
||||||
const asar = process.binding('atom_common_asar')
|
const asar = process.binding('atom_common_asar')
|
||||||
|
const {Buffer} = require('buffer')
|
||||||
const childProcess = require('child_process')
|
const childProcess = require('child_process')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
const {Buffer} = require('buffer')
|
||||||
const v8Util = process.atomBinding('v8_util')
|
const v8Util = process.atomBinding('v8_util')
|
||||||
const {ipcRenderer, isPromise, CallbacksRegistry} = require('electron')
|
const {ipcRenderer, isPromise, CallbacksRegistry} = require('electron')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue