mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -1,7 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
const { app } = require('electron')
|
||||
const cp = require('child_process')
|
||||
const path = require('path')
|
||||
|
||||
const getTempDirectory = function () {
|
||||
@@ -30,7 +29,7 @@ exports.crashReporterInit = function (options) {
|
||||
'--v=1'
|
||||
]
|
||||
|
||||
const crashServiceProcess = cp.spawn(process.helperExecPath, args, {
|
||||
const crashServiceProcess = require('child_process').spawn(process.helperExecPath, args, {
|
||||
env,
|
||||
detached: true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user