fix this reference in instantiation service (#213311)

This commit is contained in:
João Moreno 2024-05-23 16:27:34 +02:00 committed by GitHub
parent 027fce3efd
commit 3eb20557bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,9 +73,10 @@ export class InstantiationService implements IInstantiationService {
createChild(services: ServiceCollection, store?: DisposableStore): IInstantiationService {
this._throwIfDisposed();
const that = this;
const result = new class extends InstantiationService {
override dispose(): void {
this._children.delete(result);
that._children.delete(result);
super.dispose();
}
}(services, this._strict, this, this._enableTracing);