Commit de05551
Use a RAII class to track StackOverflowGuard depths
Summary:
`StackOverflowGuard` has two types of heuristics. If
`HERMES_CHECK_NATIVE_STACK` is defined, it will use real stack checking
using the current stack address. Otherwise, it will use a simple depth
count.
In the latter, users of the stack overflow guard are expected to check
for `HERMES_CHECK_NATIVE_STACK`, then increment/decrement the depth
count if necessary.
This change introduces a simple RAII class that will handle this and
makes it simpler to use.
Reviewed By: avp
Differential Revision: D82996952
fbshipit-source-id: d058403c1d86f1a3ca77a5dacc14115e6641b5ef1 parent 14f9d2d commit de05551
File tree
4 files changed
+28
-14
lines changed- include/hermes
- Support
- VM
- lib
- AST
- Regex
4 files changed
+28
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
118 | 135 | | |
119 | 136 | | |
120 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1733 | 1733 | | |
1734 | 1734 | | |
1735 | 1735 | | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
1736 | 1739 | | |
1737 | 1740 | | |
1738 | | - | |
1739 | | - | |
| 1741 | + | |
| 1742 | + | |
1740 | 1743 | | |
1741 | | - | |
| 1744 | + | |
| 1745 | + | |
1742 | 1746 | | |
| 1747 | + | |
| 1748 | + | |
1743 | 1749 | | |
1744 | 1750 | | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
1749 | | - | |
1750 | 1751 | | |
1751 | 1752 | | |
1752 | 1753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
207 | | - | |
| 205 | + | |
208 | 206 | | |
209 | 207 | | |
210 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
| 1002 | + | |
1005 | 1003 | | |
1006 | 1004 | | |
1007 | 1005 | | |
| |||
0 commit comments