Repository navigation
runtime: 本地暂停状态与 CDP 不一致时以 CDP 为准并退化求值 - #12
Merged
Merged
Conversation
本地 isPaused 与 CDP 真实状态会分叉,disable/enable 之后尤其常见。 此前遇到「Can only perform operation while paused」直接抛错,把整条求值路径堵死。 现在捕获这类错误后按 CDP 修正本地状态,再退化为页面求值, 而不是让一次状态错位变成不可恢复的失败。 配套 paused-reconcile 测试覆盖状态对账。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本地 isPaused 与 CDP 真实状态会分叉,disable/enable 之后尤其常见。此前遇到「Can only perform operation while paused」直接抛错,把整条求值路径堵死。
现在捕获这类错误后按 CDP 修正本地状态,再退化为页面求值,而不是让一次状态错位变成不可恢复的失败。
改动文件:\src/service.mjs\、\src/vendor/core-build/src/{DebuggerContext.js,tools/debugger.js,tools/script.js}\,新增 \ ests/paused-reconcile.test.js\。
验证:
ode --test --test-concurrency=2 test/*.test.mjs\ → 36 通过 / 0 失败 / 1 跳过(跳过的是 Windows 符号链接权限那条,环境限制)。