收紧移动壳分享目标缓存
移动壳分享目标缓存改为保存规范化后的分享 payload 移动壳分享测试覆盖缓存裁剪外层目标和私有字段 移动壳配置检查锁定分享目标缓存结构
This commit is contained in:
@@ -1643,6 +1643,9 @@ for (const snippet of [
|
||||
'type HostBridgeRequest',
|
||||
'const explicitPayload = normalizeHostBridgeShareOpenPayload(request.payload);',
|
||||
'normalizeHostBridgeShareOpenPayload(currentShareTarget)',
|
||||
'type ShareOpenPayload',
|
||||
'let currentShareTarget: ShareOpenPayload | null = null;',
|
||||
'currentShareTarget = normalizedTarget.payload;',
|
||||
'setMobileHostBridgeShareTarget',
|
||||
'request: HostBridgeRequest',
|
||||
"throw invalidRequest('target is required')",
|
||||
@@ -1671,6 +1674,7 @@ if (
|
||||
for (const snippet of [
|
||||
'resetMobileHostBridgeShareTargetForTest()',
|
||||
'uses cached work target when share.open has no explicit payload',
|
||||
'stores only the normalized cached share payload',
|
||||
'keeps the previous cached target when a new target is missing or invalid',
|
||||
'maps native share sheet failures to stable host errors',
|
||||
'does not fall back to cached target when explicit payload is unsafe',
|
||||
|
||||
Reference in New Issue
Block a user