Skip to content

Commit aaeb288

Browse files
authored
chore: remove unused v8 error event (microsoft#269307)
1 parent 82d335b commit aaeb288

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

src/vs/platform/utilityProcess/electron-main/utilityProcess.ts

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -329,46 +329,6 @@ export class UtilityProcess extends Disposable {
329329
this.onDidExitOrCrashOrKill();
330330
}));
331331

332-
// V8 Error
333-
this._register(Event.fromNodeEventEmitter(process, 'error', (type, location, report) => ({ type, location, report }))(({ type, location, report }) => {
334-
this.log(`crashed due to ${type} from V8 at ${location}`, Severity.Info);
335-
336-
let addons: string[] = [];
337-
try {
338-
const reportJSON = JSON.parse(report);
339-
addons = reportJSON.sharedObjects
340-
.filter((sharedObject: string) => sharedObject.endsWith('.node'))
341-
.map((addon: string) => {
342-
const index = addon.indexOf('extensions') === -1 ? addon.indexOf('node_modules') : addon.indexOf('extensions');
343-
return addon.substring(index);
344-
});
345-
} catch (e) {
346-
// ignore
347-
}
348-
349-
// Telemetry
350-
type UtilityProcessV8ErrorClassification = {
351-
processtype: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The type of utility process to understand the origin of the crash better.' };
352-
error: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The type of error from the utility process to understand the nature of the crash better.' };
353-
location: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The source location that triggered the crash to understand the nature of the crash better.' };
354-
addons: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The list of addons loaded in the utility process to understand the nature of the crash better' };
355-
owner: 'deepak1556';
356-
comment: 'Provides insight into V8 sandbox FATAL error caused by native addons.';
357-
};
358-
type UtilityProcessV8ErrorEvent = {
359-
processtype: string;
360-
error: string;
361-
location: string;
362-
addons: string[];
363-
};
364-
this.telemetryService.publicLog2<UtilityProcessV8ErrorEvent, UtilityProcessV8ErrorClassification>('utilityprocessv8error', {
365-
processtype: configuration.type,
366-
error: type,
367-
location,
368-
addons
369-
});
370-
}));
371-
372332
// Child process gone
373333
this._register(Event.fromNodeEventEmitter<{ details: Details }>(app, 'child-process-gone', (event, details) => ({ event, details }))(({ details }) => {
374334
if (details.type === 'Utility' && details.name === serviceName) {

0 commit comments

Comments
 (0)