eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.55k stars 2.46k forks source link

Fix FileResource not adding event listener to the disposable collection #13880

Closed Hanksha closed 1 week ago

Hanksha commented 1 week ago

What it does

This PR fixes the constructor of FileResource so the listener of this.fileService.onDidChangeFileSystemProviderReadOnlyMessage is properly disposed when the resource is disposed.

Fixes #13877

How to test

You can run the playwright test in examples\playwright\src\tests\theia-application-shell.test.ts. Check the logs, you should not see any emitter memory leak warning related to onDidChangeFileSystemProviderReadOnlyMessage event.

Review checklist

Reminder for reviewers

JonasHelming commented 1 week ago

@tsmaeder I think you can merge this one!