mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 11:49:38 +00:00
chore: update electron@19.0.17 (#161027)
* chore: update electron@19.0.17 * chore: update API typings * fix: compilation errors * build: add libcups dependency
This commit is contained in:
2
.yarnrc
2
.yarnrc
@@ -1,4 +1,4 @@
|
|||||||
disturl "https://electronjs.org/headers"
|
disturl "https://electronjs.org/headers"
|
||||||
target "19.0.12"
|
target "19.0.17"
|
||||||
runtime "electron"
|
runtime "electron"
|
||||||
build_from_source "true"
|
build_from_source "true"
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ exports.referenceGeneratedDepsByArch = {
|
|||||||
'libc6 (>= 2.17)',
|
'libc6 (>= 2.17)',
|
||||||
'libc6 (>= 2.2.5)',
|
'libc6 (>= 2.2.5)',
|
||||||
'libcairo2 (>= 1.6.0)',
|
'libcairo2 (>= 1.6.0)',
|
||||||
|
'libcups2 (>= 1.6.0)',
|
||||||
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
||||||
'libdbus-1-3 (>= 1.5.12)',
|
'libdbus-1-3 (>= 1.5.12)',
|
||||||
'libdrm2 (>= 2.4.38)',
|
'libdrm2 (>= 2.4.38)',
|
||||||
@@ -67,6 +68,7 @@ exports.referenceGeneratedDepsByArch = {
|
|||||||
'libc6 (>= 2.4)',
|
'libc6 (>= 2.4)',
|
||||||
'libc6 (>= 2.9)',
|
'libc6 (>= 2.9)',
|
||||||
'libcairo2 (>= 1.6.0)',
|
'libcairo2 (>= 1.6.0)',
|
||||||
|
'libcups2 (>= 1.6.0)',
|
||||||
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
||||||
'libdbus-1-3 (>= 1.5.12)',
|
'libdbus-1-3 (>= 1.5.12)',
|
||||||
'libdrm2 (>= 2.4.38)',
|
'libdrm2 (>= 2.4.38)',
|
||||||
@@ -105,6 +107,7 @@ exports.referenceGeneratedDepsByArch = {
|
|||||||
'libatspi2.0-0 (>= 2.9.90)',
|
'libatspi2.0-0 (>= 2.9.90)',
|
||||||
'libc6 (>= 2.17)',
|
'libc6 (>= 2.17)',
|
||||||
'libcairo2 (>= 1.6.0)',
|
'libcairo2 (>= 1.6.0)',
|
||||||
|
'libcups2 (>= 1.6.0)',
|
||||||
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
||||||
'libdbus-1-3 (>= 1.0.2)',
|
'libdbus-1-3 (>= 1.0.2)',
|
||||||
'libdrm2 (>= 2.4.38)',
|
'libdrm2 (>= 2.4.38)',
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export const referenceGeneratedDepsByArch = {
|
|||||||
'libc6 (>= 2.17)',
|
'libc6 (>= 2.17)',
|
||||||
'libc6 (>= 2.2.5)',
|
'libc6 (>= 2.2.5)',
|
||||||
'libcairo2 (>= 1.6.0)',
|
'libcairo2 (>= 1.6.0)',
|
||||||
|
'libcups2 (>= 1.6.0)',
|
||||||
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
||||||
'libdbus-1-3 (>= 1.5.12)',
|
'libdbus-1-3 (>= 1.5.12)',
|
||||||
'libdrm2 (>= 2.4.38)',
|
'libdrm2 (>= 2.4.38)',
|
||||||
@@ -67,6 +68,7 @@ export const referenceGeneratedDepsByArch = {
|
|||||||
'libc6 (>= 2.4)',
|
'libc6 (>= 2.4)',
|
||||||
'libc6 (>= 2.9)',
|
'libc6 (>= 2.9)',
|
||||||
'libcairo2 (>= 1.6.0)',
|
'libcairo2 (>= 1.6.0)',
|
||||||
|
'libcups2 (>= 1.6.0)',
|
||||||
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
||||||
'libdbus-1-3 (>= 1.5.12)',
|
'libdbus-1-3 (>= 1.5.12)',
|
||||||
'libdrm2 (>= 2.4.38)',
|
'libdrm2 (>= 2.4.38)',
|
||||||
@@ -105,6 +107,7 @@ export const referenceGeneratedDepsByArch = {
|
|||||||
'libatspi2.0-0 (>= 2.9.90)',
|
'libatspi2.0-0 (>= 2.9.90)',
|
||||||
'libc6 (>= 2.17)',
|
'libc6 (>= 2.17)',
|
||||||
'libcairo2 (>= 1.6.0)',
|
'libcairo2 (>= 1.6.0)',
|
||||||
|
'libcups2 (>= 1.6.0)',
|
||||||
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
||||||
'libdbus-1-3 (>= 1.0.2)',
|
'libdbus-1-3 (>= 1.0.2)',
|
||||||
'libdrm2 (>= 2.4.38)',
|
'libdrm2 (>= 2.4.38)',
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ exports.referenceGeneratedDepsByArch = {
|
|||||||
'libc.so.6(GLIBC_2.8)(64bit)',
|
'libc.so.6(GLIBC_2.8)(64bit)',
|
||||||
'libc.so.6(GLIBC_2.9)(64bit)',
|
'libc.so.6(GLIBC_2.9)(64bit)',
|
||||||
'libcairo.so.2()(64bit)',
|
'libcairo.so.2()(64bit)',
|
||||||
|
'libcups.so.2()(64bit)',
|
||||||
'libcurl.so.4()(64bit)',
|
'libcurl.so.4()(64bit)',
|
||||||
'libdbus-1.so.3()(64bit)',
|
'libdbus-1.so.3()(64bit)',
|
||||||
'libdl.so.2()(64bit)',
|
'libdl.so.2()(64bit)',
|
||||||
@@ -133,6 +134,7 @@ exports.referenceGeneratedDepsByArch = {
|
|||||||
'libc.so.6(GLIBC_2.8)',
|
'libc.so.6(GLIBC_2.8)',
|
||||||
'libc.so.6(GLIBC_2.9)',
|
'libc.so.6(GLIBC_2.9)',
|
||||||
'libcairo.so.2',
|
'libcairo.so.2',
|
||||||
|
'libcups.so.2',
|
||||||
'libcurl.so.4()(64bit)',
|
'libcurl.so.4()(64bit)',
|
||||||
'libdbus-1.so.3',
|
'libdbus-1.so.3',
|
||||||
'libdl.so.2',
|
'libdl.so.2',
|
||||||
@@ -221,6 +223,7 @@ exports.referenceGeneratedDepsByArch = {
|
|||||||
'libc.so.6()(64bit)',
|
'libc.so.6()(64bit)',
|
||||||
'libc.so.6(GLIBC_2.17)(64bit)',
|
'libc.so.6(GLIBC_2.17)(64bit)',
|
||||||
'libcairo.so.2()(64bit)',
|
'libcairo.so.2()(64bit)',
|
||||||
|
'libcups.so.2()(64bit)',
|
||||||
'libcurl.so.4()(64bit)',
|
'libcurl.so.4()(64bit)',
|
||||||
'libdbus-1.so.3()(64bit)',
|
'libdbus-1.so.3()(64bit)',
|
||||||
'libdbus-1.so.3(LIBDBUS_1_3)(64bit)',
|
'libdbus-1.so.3(LIBDBUS_1_3)(64bit)',
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export const referenceGeneratedDepsByArch = {
|
|||||||
'libc.so.6(GLIBC_2.8)(64bit)',
|
'libc.so.6(GLIBC_2.8)(64bit)',
|
||||||
'libc.so.6(GLIBC_2.9)(64bit)',
|
'libc.so.6(GLIBC_2.9)(64bit)',
|
||||||
'libcairo.so.2()(64bit)',
|
'libcairo.so.2()(64bit)',
|
||||||
|
'libcups.so.2()(64bit)',
|
||||||
'libcurl.so.4()(64bit)',
|
'libcurl.so.4()(64bit)',
|
||||||
'libdbus-1.so.3()(64bit)',
|
'libdbus-1.so.3()(64bit)',
|
||||||
'libdl.so.2()(64bit)',
|
'libdl.so.2()(64bit)',
|
||||||
@@ -132,6 +133,7 @@ export const referenceGeneratedDepsByArch = {
|
|||||||
'libc.so.6(GLIBC_2.8)',
|
'libc.so.6(GLIBC_2.8)',
|
||||||
'libc.so.6(GLIBC_2.9)',
|
'libc.so.6(GLIBC_2.9)',
|
||||||
'libcairo.so.2',
|
'libcairo.so.2',
|
||||||
|
'libcups.so.2',
|
||||||
'libcurl.so.4()(64bit)',
|
'libcurl.so.4()(64bit)',
|
||||||
'libdbus-1.so.3',
|
'libdbus-1.so.3',
|
||||||
'libdl.so.2',
|
'libdl.so.2',
|
||||||
@@ -220,6 +222,7 @@ export const referenceGeneratedDepsByArch = {
|
|||||||
'libc.so.6()(64bit)',
|
'libc.so.6()(64bit)',
|
||||||
'libc.so.6(GLIBC_2.17)(64bit)',
|
'libc.so.6(GLIBC_2.17)(64bit)',
|
||||||
'libcairo.so.2()(64bit)',
|
'libcairo.so.2()(64bit)',
|
||||||
|
'libcups.so.2()(64bit)',
|
||||||
'libcurl.so.4()(64bit)',
|
'libcurl.so.4()(64bit)',
|
||||||
'libdbus-1.so.3()(64bit)',
|
'libdbus-1.so.3()(64bit)',
|
||||||
'libdbus-1.so.3(LIBDBUS_1_3)(64bit)',
|
'libdbus-1.so.3(LIBDBUS_1_3)(64bit)',
|
||||||
|
|||||||
@@ -502,12 +502,12 @@
|
|||||||
"git": {
|
"git": {
|
||||||
"name": "electron",
|
"name": "electron",
|
||||||
"repositoryUrl": "https://github.com/electron/electron",
|
"repositoryUrl": "https://github.com/electron/electron",
|
||||||
"commitHash": "b05ccd812e3bb3de5b1546a313e298961653e942"
|
"commitHash": "0e6da36264d52656d5cd36a4c15937a6a6ca778e"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"isOnlyProductionDependency": true,
|
"isOnlyProductionDependency": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "19.0.12"
|
"version": "19.0.17"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"component": {
|
"component": {
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
"cssnano": "^4.1.11",
|
"cssnano": "^4.1.11",
|
||||||
"debounce": "^1.0.0",
|
"debounce": "^1.0.0",
|
||||||
"deemon": "^1.4.0",
|
"deemon": "^1.4.0",
|
||||||
"electron": "19.0.12",
|
"electron": "19.0.17",
|
||||||
"eslint": "8.7.0",
|
"eslint": "8.7.0",
|
||||||
"eslint-plugin-header": "3.1.1",
|
"eslint-plugin-header": "3.1.1",
|
||||||
"eslint-plugin-jsdoc": "^39.3.2",
|
"eslint-plugin-jsdoc": "^39.3.2",
|
||||||
|
|||||||
6
src/bootstrap-fork.js
vendored
6
src/bootstrap-fork.js
vendored
@@ -241,13 +241,17 @@ function listenForMessagePort() {
|
|||||||
// We need to listen for the 'port' event as soon as possible,
|
// We need to listen for the 'port' event as soon as possible,
|
||||||
// otherwise we might miss the event. But we should also be
|
// otherwise we might miss the event. But we should also be
|
||||||
// prepared in case the event arrives late.
|
// prepared in case the event arrives late.
|
||||||
process.on('port', (e) => {
|
// @ts-ignore
|
||||||
|
if (process.parentPort) {
|
||||||
|
// @ts-ignore
|
||||||
|
process.parentPort.on('message', (e) => {
|
||||||
if (global.vscodePortsCallback) {
|
if (global.vscodePortsCallback) {
|
||||||
global.vscodePortsCallback(e.ports);
|
global.vscodePortsCallback(e.ports);
|
||||||
} else {
|
} else {
|
||||||
global.vscodePorts = e.ports;
|
global.vscodePorts = e.ports;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { canceled, SerializedError, transformErrorForSerialization } from 'vs/base/common/errors';
|
import { canceled, SerializedError, transformErrorForSerialization } from 'vs/base/common/errors';
|
||||||
import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||||
import { IExtensionHostProcessOptions, IExtensionHostStarter } from 'vs/platform/extensions/common/extensionHostStarter';
|
import { IExtensionHostProcessOptions, IExtensionHostStarter } from 'vs/platform/extensions/common/extensionHostStarter';
|
||||||
import { Emitter, Event } from 'vs/base/common/event';
|
import { Emitter, Event } from 'vs/base/common/event';
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from 'vs/platform/log/common/log';
|
||||||
@@ -22,18 +22,113 @@ import * as electron from 'electron';
|
|||||||
import { IWindowsMainService } from 'vs/platform/windows/electron-main/windows';
|
import { IWindowsMainService } from 'vs/platform/windows/electron-main/windows';
|
||||||
|
|
||||||
declare namespace UtilityProcessProposedApi {
|
declare namespace UtilityProcessProposedApi {
|
||||||
interface UtilityProcessOptions {
|
interface UtilityProcessConstructorOptions {
|
||||||
serviceName?: string | undefined;
|
/**
|
||||||
execArgv?: string[] | undefined;
|
* Environment key-value pairs. Default is `process.env`.
|
||||||
env?: NodeJS.ProcessEnv | undefined;
|
*/
|
||||||
|
env?: NodeJS.ProcessEnv;
|
||||||
|
/**
|
||||||
|
* List of string arguments passed to the executable. Default is
|
||||||
|
* `process.execArgv`.
|
||||||
|
*/
|
||||||
|
execArgv?: string[];
|
||||||
|
/**
|
||||||
|
* Child's stdout and stderr configuration. Default is `pipe`. String value can be
|
||||||
|
* one of `pipe`, `ignore`, `inherit`, for more details on these values you can
|
||||||
|
* refer to stdio documentation from Node.js. Currently this option does not allow
|
||||||
|
* configuring stdin and is always set to `ignore`. For example, the supported
|
||||||
|
* values will be processed as following:
|
||||||
|
*/
|
||||||
|
stdio?: (Array<'pipe' | 'ignore' | 'inherit'>) | (string);
|
||||||
|
/**
|
||||||
|
* Name of the process that will appear in `name` property of `child-process-gone`
|
||||||
|
* event of `app`. Default is `node.mojom.NodeService`.
|
||||||
|
*/
|
||||||
|
serviceName?: string;
|
||||||
|
/**
|
||||||
|
* With this flag, the utility process will be launched via the `Electron Helper
|
||||||
|
* (Plugin).app` helper executable on macOS, which can be codesigned with
|
||||||
|
* `com.apple.security.cs.disable-library-validation` and
|
||||||
|
* `com.apple.security.cs.allow-unsigned-executable-memory` entitlements. This will
|
||||||
|
* allow the utility process to load unsigned libraries. Unless you specifically
|
||||||
|
* need this capability, it is best to leave this disabled. Default is `false`.
|
||||||
|
*
|
||||||
|
* @platform darwin
|
||||||
|
*/
|
||||||
|
allowLoadingUnsignedLibraries?: boolean;
|
||||||
}
|
}
|
||||||
export class UtilityProcess extends EventEmitter {
|
class UtilityProcess extends EventEmitter {
|
||||||
readonly pid?: number | undefined;
|
|
||||||
constructor(modulePath: string, args?: string[] | undefined, options?: UtilityProcessOptions);
|
// Docs: https://electronjs.org/docs/api/utility-process
|
||||||
postMessage(channel: string, message: any, transfer?: Electron.MessagePortMain[]): void;
|
|
||||||
kill(signal?: number | string): boolean;
|
/**
|
||||||
on(event: 'exit', listener: (event: Electron.Event, code: number) => void): this;
|
* Emitted after the child process ends. `code` contains the exit code for the
|
||||||
on(event: 'spawn', listener: () => void): this;
|
* process obtained from waitpid on posix, or GetExitCodeProcess on windows.
|
||||||
|
*/
|
||||||
|
on(event: 'exit', listener: (event: Electron.Event,
|
||||||
|
code: number) => void): this;
|
||||||
|
once(event: 'exit', listener: (event: Electron.Event,
|
||||||
|
code: number) => void): this;
|
||||||
|
addListener(event: 'exit', listener: (event: Electron.Event,
|
||||||
|
code: number) => void): this;
|
||||||
|
removeListener(event: 'exit', listener: (event: Electron.Event,
|
||||||
|
code: number) => void): this;
|
||||||
|
/**
|
||||||
|
* Emitted when the child process sends a message using
|
||||||
|
* `process.parentPort.postMessage()`.
|
||||||
|
*/
|
||||||
|
on(event: 'message', listener: (event: Electron.Event,
|
||||||
|
message: any) => void): this;
|
||||||
|
once(event: 'message', listener: (event: Electron.Event,
|
||||||
|
message: any) => void): this;
|
||||||
|
addListener(event: 'message', listener: (event: Electron.Event,
|
||||||
|
message: any) => void): this;
|
||||||
|
removeListener(event: 'message', listener: (event: Electron.Event,
|
||||||
|
message: any) => void): this;
|
||||||
|
/**
|
||||||
|
* Emitted once the child process has spawned successfully.
|
||||||
|
*/
|
||||||
|
on(event: 'spawn', listener: Function): this;
|
||||||
|
once(event: 'spawn', listener: Function): this;
|
||||||
|
addListener(event: 'spawn', listener: Function): this;
|
||||||
|
removeListener(event: 'spawn', listener: Function): this;
|
||||||
|
/**
|
||||||
|
* UtilityProcess
|
||||||
|
*/
|
||||||
|
constructor(modulePath: string, args?: string[], options?: UtilityProcessConstructorOptions);
|
||||||
|
/**
|
||||||
|
* Terminates the process gracefully. On POSIX, it uses SIGTERM but will ensure to
|
||||||
|
* reap the process on exit. This function returns true if kill succeeds, and false
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
kill(): boolean;
|
||||||
|
/**
|
||||||
|
* Send a message to the child process, optionally transferring ownership of zero
|
||||||
|
* or more [`MessagePortMain`][] objects.
|
||||||
|
*
|
||||||
|
* For example:
|
||||||
|
*/
|
||||||
|
postMessage(message: any, transfer?: Electron.MessagePortMain[]): void;
|
||||||
|
/**
|
||||||
|
* A `Integer | undefined` representing the process identifier (PID) of the child
|
||||||
|
* process. If the child process fails to spawn due to errors, then the value is
|
||||||
|
* `undefined`.
|
||||||
|
*/
|
||||||
|
pid: (number) | (undefined);
|
||||||
|
/**
|
||||||
|
* A `NodeJS.ReadableStream | null | undefined` that represents the child process's
|
||||||
|
* stderr. If the child was spawned with options.stdio[2] set to anything other
|
||||||
|
* than 'pipe', then this will be `null`. The property will be `undefined` if the
|
||||||
|
* child process could not be successfully spawned.
|
||||||
|
*/
|
||||||
|
stderr: (NodeJS.ReadableStream) | (null) | (undefined);
|
||||||
|
/**
|
||||||
|
* A `NodeJS.ReadableStream | null | undefined` that represents the child process's
|
||||||
|
* stdout. If the child was spawned with options.stdio[1] set to anything other
|
||||||
|
* than 'pipe', then this will be `null`. The property will be `undefined` if the
|
||||||
|
* child process could not be successfully spawned.
|
||||||
|
*/
|
||||||
|
stdout: (NodeJS.ReadableStream) | (null) | (undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const UtilityProcess = <typeof UtilityProcessProposedApi.UtilityProcess>((electron as any).UtilityProcess);
|
const UtilityProcess = <typeof UtilityProcessProposedApi.UtilityProcess>((electron as any).UtilityProcess);
|
||||||
@@ -286,10 +381,14 @@ class ExtensionHostProcess extends Disposable {
|
|||||||
|
|
||||||
class UtilityExtensionHostProcess extends Disposable {
|
class UtilityExtensionHostProcess extends Disposable {
|
||||||
|
|
||||||
readonly onStdout = Event.None;
|
|
||||||
readonly onStderr = Event.None;
|
|
||||||
readonly onError = Event.None;
|
readonly onError = Event.None;
|
||||||
|
|
||||||
|
readonly _onStdout = this._register(new Emitter<string>());
|
||||||
|
readonly onStdout = this._onStdout.event;
|
||||||
|
|
||||||
|
readonly _onStderr = this._register(new Emitter<string>());
|
||||||
|
readonly onStderr = this._onStderr.event;
|
||||||
|
|
||||||
readonly _onMessage = this._register(new Emitter<any>());
|
readonly _onMessage = this._register(new Emitter<any>());
|
||||||
readonly onMessage = this._onMessage.event;
|
readonly onMessage = this._onMessage.event;
|
||||||
|
|
||||||
@@ -335,6 +434,22 @@ class UtilityExtensionHostProcess extends Disposable {
|
|||||||
|
|
||||||
this._process = new UtilityProcess(modulePath, args, { serviceName, env, execArgv });
|
this._process = new UtilityProcess(modulePath, args, { serviceName, env, execArgv });
|
||||||
|
|
||||||
|
const stdoutDecoder = new StringDecoder('utf-8');
|
||||||
|
this._process.stdout?.on('data', (chunk) => {
|
||||||
|
const strChunk = typeof chunk === 'string' ? chunk : stdoutDecoder.write(chunk);
|
||||||
|
this._onStdout.fire(strChunk);
|
||||||
|
});
|
||||||
|
|
||||||
|
const stderrDecoder = new StringDecoder('utf-8');
|
||||||
|
this._process.stderr?.on('data', (chunk) => {
|
||||||
|
const strChunk = typeof chunk === 'string' ? chunk : stderrDecoder.write(chunk);
|
||||||
|
this._onStderr.fire(strChunk);
|
||||||
|
});
|
||||||
|
|
||||||
|
this._process.on('message', msg => {
|
||||||
|
this._onMessage.fire(msg);
|
||||||
|
});
|
||||||
|
|
||||||
this._register(Event.fromNodeEventEmitter<void>(this._process, 'spawn')(() => {
|
this._register(Event.fromNodeEventEmitter<void>(this._process, 'spawn')(() => {
|
||||||
this._logService.info(`UtilityProcess<${this.id}>: received spawn event.`);
|
this._logService.info(`UtilityProcess<${this.id}>: received spawn event.`);
|
||||||
}));
|
}));
|
||||||
@@ -344,26 +459,10 @@ class UtilityExtensionHostProcess extends Disposable {
|
|||||||
this._hasExited = true;
|
this._hasExited = true;
|
||||||
this._onExit.fire({ pid: this._process!.pid!, code, signal: '' });
|
this._onExit.fire({ pid: this._process!.pid!, code, signal: '' });
|
||||||
}));
|
}));
|
||||||
const listener = (event: electron.Event, details: electron.Details) => {
|
|
||||||
if (details.type !== 'Utility') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Despite the fact that we pass the argument `seviceName`,
|
|
||||||
// the details have a field called `name` where this value appears
|
|
||||||
if (details.name === serviceName) {
|
|
||||||
this._logService.info(`UtilityProcess<${this.id}>: terminated unexpectedly with code ${details.exitCode}.`);
|
|
||||||
this._hasExited = true;
|
|
||||||
this._onExit.fire({ pid: this._process!.pid!, code: details.exitCode, signal: '' });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
electron.app.on('child-process-gone', listener);
|
|
||||||
this._register(toDisposable(() => {
|
|
||||||
electron.app.off('child-process-gone', listener);
|
|
||||||
}));
|
|
||||||
|
|
||||||
const { port1, port2 } = new electron.MessageChannelMain();
|
const { port1, port2 } = new electron.MessageChannelMain();
|
||||||
|
|
||||||
this._process.postMessage('port', null, [port2]);
|
this._process.postMessage('null', [port2]);
|
||||||
responseWindow.webContents.postMessage(opts.responseChannel, opts.responseNonce, [port1]);
|
responseWindow.webContents.postMessage(opts.responseChannel, opts.responseNonce, [port1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -382,10 +481,6 @@ class UtilityExtensionHostProcess extends Disposable {
|
|||||||
// use (undocumented) _debugProcess feature of node
|
// use (undocumented) _debugProcess feature of node
|
||||||
(<ProcessExt>process)._debugProcess!(this._process.pid!);
|
(<ProcessExt>process)._debugProcess!(this._process.pid!);
|
||||||
return true;
|
return true;
|
||||||
} else if (!platform.isWindows) {
|
|
||||||
// use KILL USR1 on non-windows platforms (fallback)
|
|
||||||
this._process.kill('SIGUSR1');
|
|
||||||
return true;
|
|
||||||
} else {
|
} else {
|
||||||
// not supported...
|
// not supported...
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -3932,10 +3932,10 @@ electron-to-chromium@^1.4.202:
|
|||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.207.tgz#9c3310ebace2952903d05dcaba8abe3a4ed44c01"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.207.tgz#9c3310ebace2952903d05dcaba8abe3a4ed44c01"
|
||||||
integrity sha512-piH7MJDJp4rJCduWbVvmUd59AUne1AFBJ8JaRQvk0KzNTSUnZrVXHCZc+eg+CGE4OujkcLJznhGKD6tuAshj5Q==
|
integrity sha512-piH7MJDJp4rJCduWbVvmUd59AUne1AFBJ8JaRQvk0KzNTSUnZrVXHCZc+eg+CGE4OujkcLJznhGKD6tuAshj5Q==
|
||||||
|
|
||||||
electron@19.0.12:
|
electron@19.0.17:
|
||||||
version "19.0.12"
|
version "19.0.17"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-19.0.12.tgz#73d11cc2a3e4dbcd61fdc1c39561e7a7911046e9"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-19.0.17.tgz#850d806e88b1ef141b88b491dc41661778691c27"
|
||||||
integrity sha512-GOvG0t2NCeJYIfmC3g/dnEAQ71k3nQDbRVqQhpi2YbsYMury0asGJwqnVAv2uZQEwCwSx4XOwOQARTFEG/msWw==
|
integrity sha512-3Offu61K+d19EZIc76MhKRsSCqfe3jDiqtD0p8jXr6p/TW7+7/jOQp407ZaZu0nQN6/xDIEi2sP4XQBom6GjTQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^1.14.1"
|
"@electron/get" "^1.14.1"
|
||||||
"@types/node" "^16.11.26"
|
"@types/node" "^16.11.26"
|
||||||
|
|||||||
Reference in New Issue
Block a user