react-native/Libraries/WebSocket
Jake 228f5c83f9 use correct delegate queue in RCTRSWebSocket
Summary:
This commit makes the websocket's delegate dispatch queue use `RCTWebSocketModule`'s method queue.

This fixes a bug where didReceiveMessage was called on the wrong queue, which is especially harmful if the websocket has a contentHandler expects to be running on the RCTWebSocketModule's method queue.

This also fixes the race condition where `_contentHandlers` and `_sockets` can be mutated from the main dispatch queue (the default in `RCTRSWebSocket`) and `RCTWebSocketModule`'s method queue.

Websockets still work, and hopefully crash less now.

- [iOS][BUGFIX][WebSocket] fix crashes caused by a race condition in websocket delegates.
Closes https://github.com/facebook/react-native/pull/18530

Differential Revision: D7394298

Pulled By: hramos

fbshipit-source-id: 230466ccb47ea532ced15cd7603256a19077b32b
2018-03-24 23:16:20 -07:00
..
RCTWebSocket.xcodeproj adds --port option to `react-native run-ios` as well as patches port … 2018-01-04 20:11:10 -08:00
__mocks__ Fix WebSocket compatibility with event-target-shim ^1.0.5 2016-04-27 12:26:23 -07:00
__tests__ Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RCTReconnectingWebSocket.h Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RCTReconnectingWebSocket.m Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RCTSRWebSocket.h Backed out changeset 183744d2415b 2016-03-15 11:49:28 -07:00
RCTSRWebSocket.m Merge RCTPackagerClient into RCTPackagerConnection 2017-05-05 08:49:28 -07:00
RCTWebSocketExecutor.h Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RCTWebSocketExecutor.m Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RCTWebSocketModule.h Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RCTWebSocketModule.m use correct delegate queue in RCTRSWebSocket 2018-03-24 23:16:20 -07:00
WebSocket.js Upgrade to Flow v0.68.0 2018-03-19 18:31:36 -07:00
WebSocketEvent.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
WebSocketInterceptor.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00