mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 20:39:31 +08:00
Historically, services and worker_service implemented an abstraction around communicating across worker/socket boundaries. This implementation was used for the lighthouse_worker, where the ServiceManager.js would send message to the worker and ServiceDispatcher.js would receive these messages. However, these abstractions were not used anywhere else and were very difficult to follow. Ultimately, the abstractions were a basic interaction on top of worker.postMessage. Therefore, we can clean up these abstractions in favor of a simpler more direct approach with postMessage. Along the way, we have added clarifying comments as to what the code is doing and made some readability cleanups to the various methods and fields of the classes involved. R=jacktfranklin@chromium.org Also-By: jacktfranklin@chromium.org Bug: 1015330 Change-Id: I8edcef9a5c8c3794a695b91a77af8135164b7ed6 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2697187 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>