During process exit, static variables and thread-local variables are destroyed in an unpredictable order. The connections HashMap was static, so when destroyed during static destruction, it would destroy ConnectionFromClient objects whose notifiers would try to unregister from thread data that may have already been destroyed. Fix this by moving the connections HashMap from static storage to stack storage in ladybird_main(). This guarantees it will be destroyed before the function returns, while the event loop and all thread data are still fully alive. |
||
|---|---|---|
| .. | ||
| ImageDecoder | ||
| RequestServer | ||
| WebContent | ||
| WebDriver | ||
| WebWorker | ||
| CMakeLists.txt | ||