src/vs/workbench/api/common/extHostWebviewPanels.ts/ExtHostWebviewPanels/registerWebviewPanelSerializer
class ExtHostWebviewPanels:	public registerWebviewPanelSerializer(
		extension: IExtensionDescription,
		viewType: string,
		serializer: vscode.WebviewPanelSerializer
	): vscode.Disposable {
		if (this._serializers.has(viewType)) {
			throw new Error(`Serializer for '${viewType}' already registered`);
		}

		this._serializers.set(viewType, { serializer, extension });
		this._proxy.$registerSerializer(viewType, {
			serializeBuffersForPostMessage: shouldSerializeBuffersForPostMessage(extension)
		});

		return new extHostTypes.Disposable(() => {
			this._serializers.delete(viewType);
			this._proxy.$unregisterSerializer(viewType);
		});
	}