Fix: avoid prime worker message spam.#764
Conversation
The prime worker can receive messages posted by browser extensions (e.g. react-devtools-bridge). Since the message lacked the necessary inputs, the prime algorithm would start but never terminate.
|
I'm not sure what to do with this. On one hand, I can see how getting arbitrary messages could cause problems. And I can see how this is a simple change that would fix it (other than in the edge case where the arbitrary message had the same fields). On the other hand, I can't see why a browser extension would send arbitrary messages to a worker and not expect havoc to ensue. What is being sent, and why? Is there somewhere that suggests best practices for this? |
|
I think it's fine to ensure that we're only acting on messages that are intended to be received by the worker. However, we should add a more specific message |
|
Tried another approach in #941. |
|
Closing in favor of #941, which should be merged. |
The prime worker can receive messages posted by browser extensions (e.g. react-devtools-bridge). Since the message lacked the necessary inputs, the prime algorithm would start but never terminate. This drops useless messages on the floor.