File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
vs/platform/utilityProcess/electron-main Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -239,13 +239,22 @@ function terminateWhenParentTerminates() {
239
239
function configureCrashReporter ( ) {
240
240
const crashReporterSandboxedHint = process . env [ 'VSCODE_CRASH_REPORTER_SANDBOXED_HINT' ] ;
241
241
if ( crashReporterSandboxedHint ) {
242
- try {
243
- if ( process [ 'crashReporter' ] && typeof process [ 'crashReporter' ] . addExtraParameter === 'function' /* Electron only */ ) {
244
- process [ 'crashReporter' ] . addExtraParameter ( '_sandboxed' , 'true' ) ;
245
- }
246
- } catch ( error ) {
247
- console . error ( error ) ;
242
+ addCrashReporterParameter ( '_sandboxed' , 'true' ) ;
243
+ }
244
+
245
+ const crashReporterProcessType = process . env [ 'VSCODE_CRASH_REPORTER_PROCESS_TYPE' ] ;
246
+ if ( crashReporterProcessType ) {
247
+ addCrashReporterParameter ( 'processType' , crashReporterProcessType ) ;
248
+ }
249
+ }
250
+
251
+ function addCrashReporterParameter ( key , value ) {
252
+ try {
253
+ if ( process [ 'crashReporter' ] && typeof process [ 'crashReporter' ] . addExtraParameter === 'function' /* Electron only */ ) {
254
+ process [ 'crashReporter' ] . addExtraParameter ( key , value ) ;
248
255
}
256
+ } catch ( error ) {
257
+ console . error ( error ) ;
249
258
}
250
259
}
251
260
Original file line number Diff line number Diff line change @@ -237,8 +237,9 @@ export class UtilityProcess extends Disposable {
237
237
env [ 'VSCODE_PARENT_PID' ] = String ( configuration . parentLifecycleBound ) ;
238
238
}
239
239
if ( isWindowSandboxed ) {
240
- env [ 'VSCODE_CRASH_REPORTER_SANDBOXED_HINT' ] = '1' ;
240
+ env [ 'VSCODE_CRASH_REPORTER_SANDBOXED_HINT' ] = '1' ; // TODO @bpasero remove me once sandbox is final
241
241
}
242
+ env [ 'VSCODE_CRASH_REPORTER_PROCESS_TYPE' ] = configuration . type ;
242
243
243
244
// Remove any environment variables that are not allowed
244
245
removeDangerousEnvVariables ( env ) ;
You can’t perform that action at this time.
0 commit comments