Skip to content
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

Refacto Env JS execution and result #239

Merged
merged 9 commits into from
Jul 8, 2024
Merged

Refacto Env JS execution and result #239

merged 9 commits into from
Jul 8, 2024

Conversation

francisbouvier
Copy link
Member

  • return a JSValue instead of a JSResult, preserving the underlying value and avoiding automatic stringification (with allocation)
  • let the caller handle TryCatch if needed, including retreiving exception and stack if needed
  • refacto the TryCatch interface to hide v8 implementation from the public implementation
  • simplify the Env related methods (exec + execWait)
  • do not close shell on JS exec error

- return a JSValue instead of a JSResult, preserving the underlying
value and avoiding automatic stringification (with allocation)
- let the caller handle TryCatch if needed, including retreiving
exception and stack if needed
- refacto the TryCatch interface to hide v8 implementation from the
public implementation
- simplify the Env related methods (exec + execWait)
- do not close shell on JS exec error

Signed-off-by: Francis Bouvier <[email protected]>
src/engines/v8/v8.zig Outdated Show resolved Hide resolved
src/engines/v8/v8.zig Show resolved Hide resolved
src/engines/v8/v8.zig Outdated Show resolved Hide resolved
src/engines/v8/v8.zig Outdated Show resolved Hide resolved
src/engines/v8/v8.zig Show resolved Hide resolved
src/engines/v8/v8.zig Show resolved Hide resolved
src/shell.zig Outdated Show resolved Hide resolved
src/engines/v8/v8.zig Show resolved Hide resolved
Signed-off-by: Francis Bouvier <[email protected]>
@francisbouvier francisbouvier merged commit 3fcd9b8 into main Jul 8, 2024
6 checks passed
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