Revert requestTermination change#6626
Conversation
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR reverts the requestTermination / isTerminationRequested mechanism from the C++ JSG layer, but the Rust FFI layer still depends on those removed methods.
Issues (by severity)
-
Build break (high): The Rust FFI layer in
src/rust/jsg/has active callers of the removedIsolateBase::requestTermination()andIsolateBase::isTerminationRequested()methods. These files need corresponding changes:src/rust/jsg/ffi.c++:1089-1095—isolate_request_termination()andisolate_is_termination_requested()call the removed methodssrc/rust/jsg/ffi.h:343-344— declares those FFI functionssrc/rust/jsg/v8.rs:555-556— Rust-side FFI declarationssrc/rust/jsg/lib.rs:599-623—Lock::request_termination()andLock::is_termination_requested()public methodssrc/rust/jsg/lib.rs:819—catch_panic()callslock.request_termination()after converting a Rust panic to a JS exceptionsrc/rust/jsg-test/tests/resource_callback.rs:441-488— test that asserts onis_termination_requested()
The
catch_paniccase is particularly important: it's the Rust panic handler that terminates the isolate after a panic to prevent GC from observing partially-mutated state. This needs a replacement — likely switching toterminateExecution()(which is still available onIsolateBase) instead of the removedrequestTermination(). Theis_termination_requested()check in the test would need a different assertion strategy since there's no longer a flag to query.
|
Review posted successfully on PR #6626. Here's a summary: High-severity issue found: The PR removes
|
|
The generated output of |
6c350af to
d4933af
Compare
|
UnknownError: ProviderInitError |
|
@erikcorry Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR reverts the requestTermination/isTerminationRequested mechanism from C++ and Rust, replacing the Rust-side usage with direct terminateExecution() calls, since the upstream V8 fix makes the workaround unnecessary.
The build break I flagged in the previous review has been addressed — the Rust FFI layer now consistently uses isolate_terminate_execution across all three bridge files, catch_panic still terminates the isolate after a Rust panic, and the test assertions on the removed flag have been cleaned up.
Issues
- (Low) Stale comments in
resource_callback.rs— the doc comment on line 441 and the code comment on line 462 still referencerequest_termination()instead ofterminate_execution(). These are outside the diff so I can't suggest inline, but they should be updated for consistency.
This review was generated by an AI assistant and may contain errors.
|
Review posted successfully on PR #6626. Here's a summary: The PR has addressed the build break I flagged in my previous review. The only remaining issue is low-severity: two stale comments in |
c2414c4 to
e475dcf
Compare
A better solution was found in the form of https://chromium-review.googlesource.com/c/v8/v8/+/7734848 and so this interface is unused.