Moving resolve uri logic into openerService

- Add a resolveExternalUri function to the opener service. This service already has to know how to resolve external uris so it makes sense that the function lives there

- Move the tunneling logic for desktop into window.ts

- Make result of resolve disposable
This commit is contained in:
Matt Bierner
2019-09-20 17:16:30 -07:00
parent 6710df4460
commit a817a588c7
7 changed files with 59 additions and 81 deletions

View File

@@ -62,11 +62,11 @@ export class ExtHostWindow implements ExtHostWindowShape {
return Promise.reject(`Invalid scheme '${uri.scheme}'`);
}
const resolved = await this._proxy.$resolveExternalUri(uri, options);
const { result, handle } = await this._proxy.$resolveExternalUri(uri, options);
return {
resolved: URI.from(resolved),
resolved: URI.from(result),
dispose: once(() => {
this._proxy.$releaseResolvedExternalUri(uri);
this._proxy.$releaseResolvedExternalUri(handle);
}),
};
}