提交 ca7605f3 编写于 作者: M Matt Bierner

Use a uuid as our webview handles

Avoid having duplicated ids/handles
上级 f57ff0b2
......@@ -18,8 +18,6 @@ import { generateUuid } from 'vs/base/common/uuid';
type IconPath = URI | { light: URI, dark: URI };
export class ExtHostWebview implements vscode.Webview {
private readonly _uuid: string = generateUuid();
private _html: string;
private _isDisposed: boolean = false;
......@@ -38,7 +36,7 @@ export class ExtHostWebview implements vscode.Webview {
}
public toWebviewResource(resource: vscode.Uri): vscode.Uri {
return toWebviewResource(this._initData, this._uuid, resource);
return toWebviewResource(this._initData, this._handle, resource);
}
public get cspSource(): string {
......@@ -234,10 +232,9 @@ export class ExtHostWebviewPanel implements vscode.WebviewPanel {
}
export class ExtHostWebviews implements ExtHostWebviewsShape {
private static webviewHandlePool = 1;
private static newHandle(): WebviewPanelHandle {
return ExtHostWebviews.webviewHandlePool++ + '';
return generateUuid();
}
private readonly _proxy: MainThreadWebviewsShape;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册