收口宿主导航诊断日志
微信小程序导航失败日志改为固定标签 移动 WebView 进程失败日志不再输出 detail 对象 补充门禁和共享决策记录
This commit is contained in:
@@ -733,10 +733,9 @@ describe('ShellApp HostBridge event injection', () => {
|
||||
});
|
||||
|
||||
expect(shellHarness.reloadWebView).toHaveBeenCalledTimes(1);
|
||||
expect(warnSpy).toHaveBeenCalledWith('mobile WebView process failed', {
|
||||
count: 1,
|
||||
label: 'content_process_terminated',
|
||||
});
|
||||
expect(warnSpy).toHaveBeenCalledWith(
|
||||
'mobile WebView process failed for content_process_terminated',
|
||||
);
|
||||
|
||||
warnSpy.mockRestore();
|
||||
nowSpy.mockRestore();
|
||||
@@ -765,10 +764,9 @@ describe('ShellApp HostBridge event injection', () => {
|
||||
expect(screen.getByText('页面已停止')).toBeTruthy();
|
||||
});
|
||||
expect(shellHarness.reloadWebView).toHaveBeenCalledTimes(1);
|
||||
expect(warnSpy).toHaveBeenLastCalledWith('mobile WebView process failed', {
|
||||
count: 2,
|
||||
label: 'render_process_gone',
|
||||
});
|
||||
expect(warnSpy).toHaveBeenLastCalledWith(
|
||||
'mobile WebView process failed for render_process_gone',
|
||||
);
|
||||
|
||||
act(() => {
|
||||
screen.getByText('重试').click();
|
||||
|
||||
@@ -425,10 +425,7 @@ export default function ShellApp() {
|
||||
firstFailureAt: now,
|
||||
};
|
||||
webViewProcessFailureRef.current = nextFailureWindow;
|
||||
console.warn('mobile WebView process failed', {
|
||||
count: nextFailureWindow.count,
|
||||
label,
|
||||
});
|
||||
console.warn(`mobile WebView process failed for ${label}`);
|
||||
|
||||
if (nextFailureWindow.count <= MOBILE_WEBVIEW_PROCESS_FAILURE_RELOAD_LIMIT) {
|
||||
reloadCurrentWebView();
|
||||
|
||||
Reference in New Issue
Block a user