Use SerializableObjectWithBuffers instead of spread

Fixes #137757
This commit is contained in:
Matt Bierner
2021-12-10 17:20:24 -08:00
parent 56c43b31e8
commit 12ff67ad9d
3 changed files with 8 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ import { IExtHostApiDeprecationService } from 'vs/workbench/api/common/extHostAp
import { serializeWebviewMessage, deserializeWebviewMessage } from 'vs/workbench/api/common/extHostWebviewMessaging';
import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace';
import { asWebviewUri, webviewGenericCspSource, WebviewInitData } from 'vs/workbench/api/common/shared/webview';
import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier';
import type * as vscode from 'vscode';
import * as extHostProtocol from './extHost.protocol';
@@ -160,11 +161,11 @@ export class ExtHostWebviews implements extHostProtocol.ExtHostWebviewsShape {
public $onMessage(
handle: extHostProtocol.WebviewHandle,
jsonMessage: string,
...buffers: VSBuffer[]
buffers: SerializableObjectWithBuffers<VSBuffer[]>
): void {
const webview = this.getWebview(handle);
if (webview) {
const { message } = deserializeWebviewMessage(jsonMessage, buffers);
const { message } = deserializeWebviewMessage(jsonMessage, buffers.value);
webview._onMessageEmitter.fire(message);
}
}