收紧窗口标题载荷边界
将 app.setTitle 标题长度和控制字符规则提升到共享 HostBridge 契约 让 H5 facade 和 Tauri 壳按共享窗口标题边界归一化载荷 增加标题边界测试和三端壳总门禁反查 同步宿主壳协议文档和共享决策记录
This commit is contained in:
@@ -979,6 +979,7 @@ function assertH5HostBridgePayloadBoundaries() {
|
||||
'HOST_BRIDGE_RUNTIME_REFRESH_TIMEOUT_MS',
|
||||
'HOST_BRIDGE_USER_INTERACTION_TIMEOUT_MS',
|
||||
'HOST_BRIDGE_SCANNER_TIMEOUT_MS',
|
||||
'HOST_BRIDGE_APP_TITLE_MAX_LENGTH',
|
||||
]) {
|
||||
if (!h5HostBridgeSource.includes(`${sharedBoundary},`)) {
|
||||
throw new Error(
|
||||
@@ -1052,6 +1053,18 @@ function assertH5HostBridgePayloadBoundaries() {
|
||||
'H5 HostBridge facade must normalize haptics.impact payloads with the shared style boundary',
|
||||
);
|
||||
}
|
||||
if (
|
||||
!h5HostBridgeSource.includes(
|
||||
'const normalizedTitle = normalizeHostBridgeAppTitle(title);',
|
||||
) ||
|
||||
!h5HostBridgeSource.includes(
|
||||
"return await requestNativeHostBoolean('app.setTitle', normalizedTitle);",
|
||||
)
|
||||
) {
|
||||
throw new Error(
|
||||
'H5 HostBridge facade must normalize app.setTitle payloads with the shared title boundary',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function assertH5NativeAppTransportTimeoutBoundaries() {
|
||||
|
||||
Reference in New Issue
Block a user