debt - getWindows is electron only

This commit is contained in:
Benjamin Pasero
2019-09-25 09:35:28 +02:00
parent cc036f3f7c
commit d0b67392e7
23 changed files with 173 additions and 139 deletions

View File

@@ -58,7 +58,7 @@ export class MainThreadCommands implements MainThreadCommandsShape {
id,
CommandsRegistry.registerCommand(id, (accessor, ...args) => {
return this._proxy.$executeContributedCommand(id, ...args).then(result => {
return revive(result, 0);
return revive(result);
});
})
);
@@ -74,7 +74,7 @@ export class MainThreadCommands implements MainThreadCommandsShape {
async $executeCommand<T>(id: string, args: any[], retry: boolean): Promise<T | undefined> {
for (let i = 0; i < args.length; i++) {
args[i] = revive(args[i], 0);
args[i] = revive(args[i]);
}
if (retry && args.length > 0 && !CommandsRegistry.getCommand(id)) {
await this._extensionService.activateByEvent(`onCommand:${id}`);

View File

@@ -52,7 +52,7 @@ export class ExtHostCommands implements ExtHostCommandsShape {
{
processArgument(a) {
// URI, Regex
return revive(a, 0);
return revive(a);
}
},
{
@@ -141,7 +141,7 @@ export class ExtHostCommands implements ExtHostCommandsShape {
try {
const result = await this._proxy.$executeCommand<T>(id, toArgs, retry);
return revive(result, 0);
return revive(result);
} catch (e) {
// Rerun the command when it wasn't known, had arguments, and when retry
// is enabled. We do this because the command might be registered inside