MCPcopy Index your code
hub / github.com/zxlie/FeHelper / workerErrorHandler

Function workerErrorHandler

apps/json-format/format-lib.js:1667–1672  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1665 if (worker) {
1666 // 设置错误处理,如果Worker因为CSP等原因失败,回退到同步模式
1667 let workerErrorHandler = function(e) {
1668 // 静默处理,不输出日志
1669 cspRestricted = true; // 标记为CSP受限,避免重复尝试
1670 workerInstance = null;
1671 formatSync(jsonStr, skin, escapeJsonString);
1672 };
1673 worker.onerror = workerErrorHandler;
1674
1675 // 设置超时,如果Worker长时间无响应,回退到同步模式

Callers

nothing calls this directly

Calls 1

formatSyncFunction · 0.85

Tested by

no test coverage detected