add some logging to ipc object channels
This commit is contained in:
parent
1d883f8af1
commit
203f1cb56b
1 changed files with 7 additions and 1 deletions
|
@ -155,10 +155,16 @@ export class ProtocolMainService extends Disposable implements IProtocolMainServ
|
|||
const handler = async (): Promise<T> => obj;
|
||||
ipcMain.handle(channel, handler);
|
||||
|
||||
this.logService.trace(`IPC Object URL: Registered new channel ${channel}.`);
|
||||
|
||||
return {
|
||||
resource,
|
||||
update: updatedObj => obj = updatedObj,
|
||||
dispose: () => ipcMain.removeHandler(channel)
|
||||
dispose: () => {
|
||||
this.logService.trace(`IPC Object URL: Removed channel ${channel}.`);
|
||||
|
||||
ipcMain.removeHandler(channel);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue