-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sandbox: explore how to support direct helper process to renderer communication #131798
Comments
BrowserWindow
(to convert shared process into a node.js process)
@deepak1556 any update on this? Do we have an upstream issue we can link? |
Prototype demonstrating communication between Node integration enabled chromium service process and sandbox renderer is complete. Link: https://streamable.com/tqozwr Current state of API: // Main Process
interface ProcessOptions {
displayName?: string | undefined;
execArgv?: string[] | undefined;
env?: NodeJS.ProcessEnv | undefined;
}
interface MessageEvent {
data: any;
}
class UtilityProcess extends NodeJS.EventEmitter {
constructor(modulePath: string, args?: string[] | undefined, options?: ProcessOptions);
readonly pid?: number | undefined;
/*
* Pending Implementation
postMessage(channel: string, message: any, transfer?: Electron.MessagePortMain[]): void;
*/
kill(signal: number): boolean;
/*
* Pending Implementation
on(event: 'message', listener: (event: MessageEvent) => void): this;
*/
on(event: 'exit', listener: (code: number) => void): this;
on(event: 'spawn', listener: (void) => void): this;
}
// Service Process
interface MessageEvent {
data: any;
ports: MessagePortMain[];
}
interface Process extends NodeJS.EventEmitter {
on(channel: string, listener: (event: MessageEvent) => void): this;
/*
* Pending Implementation
send(message: any);
*/
} |
Next Steps in order:
|
Will this work enable shareable non-copy buffers, rather than one-way ownership transfer? |
Exploration is complete and extension host has adopted this behind a setting. Next steps continued in #154007 |
Allow direct communication between a helper process and the renderer.
Some raw ideas
BrowserWindow.loadUrl
butUtilityProcess.loadUrl
to create such a child processThe text was updated successfully, but these errors were encountered: