Skip to content

Commit

Permalink
Implement graceful recovery from v8 out-of-memory on JsRuntime.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonforal committed Jan 15, 2025
1 parent 53dc26a commit 1a0eab5
Show file tree
Hide file tree
Showing 3 changed files with 448 additions and 12 deletions.
2 changes: 2 additions & 0 deletions crates/static-analysis-kernel/src/analysis/ddsa_lib/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub enum DDSAJsRuntimeError {
TreeSitterTimeout { timeout: Duration },
#[error("JavaScript execution timeout")]
JavaScriptTimeout { timeout: Duration },
#[error("JavaScript exceeded memory constraint")]
JavaScriptMemoryExceeded,
#[error("expected `{name}` to exist within the v8 context")]
VariableNotFound { name: String },
#[error("type should be \"{expected}\", not \"{got}\"")]
Expand Down
Loading

0 comments on commit 1a0eab5

Please sign in to comment.