Commit Graph
1 Commits
Author SHA1 Message Date
Channing Conger 1652992148 Make code-mode exit() stop the entire cell (#52748)
## Why

A catchable exception lets JavaScript continue after `exit()`, including in `catch`, `finally`, and queued promise callbacks. Exiting should finish the cell successfully without further output or state changes.

## What changed

- Terminate V8 execution when `exit()` is called and complete the cell even if its module promise remains pending.
- Guard host callbacks against effects after exit, including when getters or value conversion request exit.
- Preserve stored writes made before exit and suppress errors when exit occurs during exception formatting.

## Testing

Add regression tests for synchronous and asynchronous exit, timers, parallel promises, value conversion, exception getters, and resuming after a yield and tool response. Verify that only prior output and stored writes survive, and separately exercise host guards while JavaScript continues running.

GitOrigin-RevId: e9487ba65ef0358612c5009bd26953b786a12798
2026-10-10 02:14:13 +00:00