拆分 OAuth 后置验证流程
This commit is contained in:
@@ -649,7 +649,7 @@
|
||||
settled = true;
|
||||
const seconds = Math.ceil(responseTimeoutMs / 1000);
|
||||
console.warn(LOG_PREFIX, `[sendTabMessageWithTimeout] timeout ${debugLabel} after ${Date.now() - startedAt}ms`);
|
||||
reject(new Error(`Content script on ${source} did not respond in ${seconds}s. Try refreshing the tab and retry.`));
|
||||
reject(new Error(`${getSourceLabel(source)} 内容脚本 ${seconds} 秒内未响应,请刷新页面后重试。`));
|
||||
}, responseTimeoutMs);
|
||||
|
||||
chrome.tabs.sendMessage(tabId, message)
|
||||
@@ -677,7 +677,7 @@
|
||||
const commandKey = getSourceCommandKey(source);
|
||||
const timer = setTimeout(() => {
|
||||
pendingCommands.delete(commandKey);
|
||||
reject(new Error(`Content script on ${source} did not respond in ${timeout / 1000}s. Try refreshing the tab and retry.`));
|
||||
reject(new Error(`${getSourceLabel(source)} 内容脚本 ${timeout / 1000} 秒内未响应,请刷新页面后重试。`));
|
||||
}, timeout);
|
||||
pendingCommands.set(commandKey, {
|
||||
message,
|
||||
|
||||
Reference in New Issue
Block a user