Commit 18bfce9
committed
Surface scope encoding errors from phongo_javascript_init
When phongo_zval_to_bson throws while encoding the scope, release the
already-allocated code buffer and the partially-written scope BSON,
and report failure to the caller. Previously the function returned
true even though intern was left in an inconsistent state.1 parent 8c5e254 commit 18bfce9
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| |||
0 commit comments