Commit 917ab57
committed
Concurrency: Annotate
Even though `JSObject` is not a `Sendable` type, `JSError` must be
`Sendable` because of `Error` conformance. For this reason, we need to
annotate the `jsObject` property as `nonisolated(unsafe)` to suppress
the compiler error. Accessing this property from a different isolation
domain scheduled on a different thread will result in a runtime
assertion failure, but better than corrupting memory.jsObject property of JSError as nonisolated(unsafe)
1 parent 28f3471 commit 917ab57
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
0 commit comments