Repository navigation
feat(engine): stop running code through an interrupt flag - #5650
Open
bastienfaivre wants to merge 1 commit into
Open
bastienfaivre wants to merge 1 commit into
bastienfaivre wants to merge 1 commit into
Conversation
This was referenced Nov 10, 2026
Test262 conformance changes
Tested main commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5650 +/- ##
===========================================
+ Coverage 47.24% 63.15% +15.91%
===========================================
Files 476 538 +62
Lines 46892 60620 +13728
===========================================
+ Hits 22154 38285 +16131
+ Misses 24738 22335 -2403 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
This Pull Request closes #3442.
It changes the following:
Context::set_interrupt_flag(Option<Arc<AtomicBool>>). While the flag is set, the next loop iteration or function call fails with the newEngineError::Interrupted, which scripts can't catch. The flag can be set from another thread.IncrementLoopIteration,check_runtime_limits).try/catch, native functions that call back into JS, resetting or removing the flag, and setting it from another thread.Discussion
Optionper check, plus a relaxed atomic load when a flag is set. Not benchmarked.EngineErrorisn't#[non_exhaustive], so the new variant is a breaking change.