Commit b913a30
committed
fix: avoid SetGlobalDefaultError panic when rolldown devtools is enabled
Skip installing a global tracing subscriber during NAPI module init when
VITE_LOG is not set. Previously, init_tracing() always installed a no-op
subscriber (empty Targets filter) that occupied the global default slot.
When rolldown devtools was later enabled via build.rolldownOptions.devtools,
DebugTracer::init() would panic trying to claim the already-occupied slot.
Now the global default slot stays free for other components unless VITE_LOG
is explicitly set, and even then try_init() is used for graceful fallback.
Closes #13561 parent a94deea commit b913a30
File tree
1 file changed
+18
-9
lines changed1 file changed
+18
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
22 | 36 | | |
23 | 37 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 38 | + | |
| 39 | + | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
36 | | - | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
0 commit comments