Commit 13a175d
committed
Reduce amount of call stack used in hybrid_chain
Replaces `tryCatch` in `hybrid_chain` with `withCallingHandlers`. This improves
Shiny on webR on Safari < 16.4 by reducing the amount of call stack used during
deep nested calls to `hybrid_chain`.
A `delayedAssign` is used so that if the error condition handler is invoked,
the condition is handled or re-thrown in the context of `hybrid_chain`, rather
than the context of the inner function deeper in the stack.
The `finally` argument is reimplemented with an `on.exit()`.1 parent b129739 commit 13a175d
1 file changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1511 | 1511 | | |
1512 | 1512 | | |
1513 | 1513 | | |
1514 | | - | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
1515 | 1527 | | |
1516 | 1528 | | |
1517 | 1529 | | |
| |||
1539 | 1551 | | |
1540 | 1552 | | |
1541 | 1553 | | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
1548 | 1557 | | |
1549 | 1558 | | |
1550 | 1559 | | |
| |||
0 commit comments