Repository navigation
Commit 76df88c
committed
sqlite: check database state before calling SQLite
Check whether the database is open in enableLoadExtension() and
setAuthorizer() before passing the connection to SQLite. This prevents
calls after close() from terminating the process and makes them throw
ERR_INVALID_STATE instead.
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol1 parent 6d0db4a commit 76df88c
3 files changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2396 | 2396 | | |
2397 | 2397 | | |
2398 | 2398 | | |
2399 | | - | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
2400 | 2403 | | |
2401 | 2404 | | |
2402 | 2405 | | |
| |||
2424 | 2427 | | |
2425 | 2428 | | |
2426 | 2429 | | |
2427 | | - | |
| 2430 | + | |
2428 | 2431 | | |
2429 | 2432 | | |
2430 | 2433 | | |
| |||
2475 | 2478 | | |
2476 | 2479 | | |
2477 | 2480 | | |
| 2481 | + | |
| 2482 | + | |
2478 | 2483 | | |
2479 | 2484 | | |
2480 | 2485 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
278 | 290 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments