refactor: lazy load child_process in the crash-reporter module (#18574)
This module is on the hot load path and we don't need cp till later
This commit is contained in:
parent
477b09db3e
commit
0ee2f8a64a
1 changed files with 1 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const { app } = require('electron')
|
const { app } = require('electron')
|
||||||
const cp = require('child_process')
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
const getTempDirectory = function () {
|
const getTempDirectory = function () {
|
||||||
|
@ -30,7 +29,7 @@ exports.crashReporterInit = function (options) {
|
||||||
'--v=1'
|
'--v=1'
|
||||||
]
|
]
|
||||||
|
|
||||||
const crashServiceProcess = cp.spawn(process.helperExecPath, args, {
|
const crashServiceProcess = require('child_process').spawn(process.helperExecPath, args, {
|
||||||
env,
|
env,
|
||||||
detached: true
|
detached: true
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue