WS connection should not crash with JS bindings session
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
inspector, test: reafactor inspector WS socket implementation to be a proper C++
To make it easier to review, I split the change into 2 commits that can be merged after the review.
First commit rewrites WebSockets C API into C++ that allows better management of the object lifecycle. Second implements a change when WS session is not accepted until the session is established on the main thread (this is to ensure there is no current JS bindings session).