microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.43k stars 29.34k forks source link

Emitter option "onDidAddListener" never triggers #230258

Open kkshinkai opened 1 month ago

kkshinkai commented 1 month ago

Seems like the Emitter's onDidAddListener event isn't triggered. I couldn't find any place in the code that fires this function. We might need to call it in the Emitter.event getter.

https://github.com/microsoft/vscode/blob/9955224c7351465f4962121bdec70c425a4e74c2/src/vs/base/common/event.ts#L785

This may also cause some leak checks to be ineffective.

bpasero commented 1 month ago

This event was lost in https://github.com/microsoft/vscode/pull/185889, specifically https://github.com/microsoft/vscode/pull/185889/files#diff-ee32e41fb1e9e5d20a97448918f5d82548b1965a2a6dd8ecb8102e1e8765d402L980