收紧桌面壳网络事件声明
桌面壳移除未由 Rust 真实驱动的 network.statusChanged 能力 桌面网络状态保留 Rust 主站可达性主动查询 门禁禁止桌面网络事件回退到 WebView online 状态 文档和项目记忆同步桌面网络能力边界
This commit is contained in:
@@ -1654,11 +1654,19 @@ function assertNativeShellCapabilityPlan() {
|
||||
'desktop shell runtime event whitelist',
|
||||
);
|
||||
|
||||
for (const eventName of sharedEvents) {
|
||||
if (!sharedDesktopCapabilities.includes(eventName)) {
|
||||
throw new Error(`shared HostBridge event must be in desktop capability profile: ${eventName}`);
|
||||
const desktopEventWhitelist = extractRustStringArray(desktopEventSource, 'HOST_BRIDGE_EVENTS');
|
||||
for (const eventName of sharedDesktopCapabilities.filter((capability) =>
|
||||
sharedEvents.includes(capability),
|
||||
)) {
|
||||
if (!desktopEventWhitelist.includes(eventName)) {
|
||||
throw new Error(`desktop HostBridge event must be in Rust event whitelist: ${eventName}`);
|
||||
}
|
||||
}
|
||||
if (sharedDesktopCapabilities.includes('network.statusChanged')) {
|
||||
throw new Error(
|
||||
'desktop shell must not declare network.statusChanged until Rust owns a real event source',
|
||||
);
|
||||
}
|
||||
|
||||
assertSameList(
|
||||
desktopCapabilities,
|
||||
|
||||
Reference in New Issue
Block a user