Skip to content

fix: promise returned by getRuntimeMetrics never resolved #573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2025

Conversation

nyannyacha
Copy link
Contributor

What kind of change does this PR introduce?

Bug fix

Description

v8 Isolate has a flag internally to check if a pending interruption request exists, but this flag is recorded as thread-local state, and if Isolate is executed in another thread by a locker, this state does not carry over.

Therefore, in edge-runtime, lines existed to force the interruption flag to be set by calling a dummy interruption request under certain conditions, but when interruptions were requested via op_runtime_metrics, this flag was not set due to a subtle issue.
As a result, the interruption callback was never called and the promise never transitioned to the resolved state.
This PR fixes these issues.

@nyannyacha nyannyacha requested a review from laktek July 28, 2025 02:08
@nyannyacha nyannyacha merged commit 0e71c5c into develop Jul 28, 2025
4 checks passed
@nyannyacha nyannyacha deleted the ny/fix-runtime-stat branch July 28, 2025 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants