Commit 2b44e64
authored
This fix came about because I was trying to remove the
`@requires_pthread` decorator from the `WASM_WORKER` tests in
test_core.py. This decorator should not be needed or used for wasm
worker tests because it injects the `-pthread` compile flag.
Without this fix the `ENVIRONMENT_IS_WORKER` is not set correctly under
node which means that `emscripten_is_main_browser_thread` was reporting
the wrong value when called from within a Wasm Worker.
This bug was being hidden when the program was compiled with both
pthreads and wasm workers enabled.
1 parent 2760f83 commit 2b44e64
3 files changed
Lines changed: 13 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9700 | 9700 | | |
9701 | 9701 | | |
9702 | 9702 | | |
9703 | | - | |
9704 | 9703 | | |
9705 | 9704 | | |
9706 | 9705 | | |
| |||
9711 | 9710 | | |
9712 | 9711 | | |
9713 | 9712 | | |
9714 | | - | |
9715 | 9713 | | |
9716 | 9714 | | |
9717 | 9715 | | |
9718 | 9716 | | |
9719 | 9717 | | |
9720 | | - | |
9721 | 9718 | | |
9722 | 9719 | | |
9723 | 9720 | | |
9724 | 9721 | | |
9725 | 9722 | | |
9726 | | - | |
9727 | 9723 | | |
9728 | 9724 | | |
9729 | 9725 | | |
| |||
0 commit comments