Commit 1650a17
committed
fix(patch): allow JS execution in finalizer callbacks
V8 14.9 holds a DisallowJavascriptExecution across the whole collection,
the epilogue included, and turns entering JS from a GC callback into a
GRACEFUL_FATAL. 10.3 ran the second-pass callbacks under an explicit
AllowJavascriptExecution, which the iOS runtime relies on: disposing an
ObjC wrapper runs -dealloc, and any JS-backed override that teardown
reaches re-enters JS through ArgConverter::MethodCallback.
The scope is lifted around the finalizer drain alone, so the second-pass
callbacks below it still satisfy their own assertion that JS is
disallowed. Verified by compiling global-handles.o for arm64-simulator.1 parent 9696214 commit 1650a17
2 files changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
250 | 259 | | |
251 | 260 | | |
252 | 261 | | |
253 | 262 | | |
254 | | - | |
| 263 | + | |
255 | 264 | | |
256 | 265 | | |
257 | 266 | | |
| |||
0 commit comments