Alright, we had a few merge conflicts, but I think I have it now.
I also discovered an issue where the context was leaking if we got a bad message because the OnDisconnect method wasn't getting called, so that meant that the contexts being destroyed was never happening. I added a waiter to wait on the contexts being destroyed instead of using RunUntilIdle.
WebNNTestEnvironment tracks per-receiver disconnect handlers via
flat_mapEmily AndrewsPlease update the CL description to match the latest implementation.
Done
context_provider_->SetDisconnectHandlerForTesting(Emily AndrewsReading through the code for set_disconnect_handler, I believe there can only be one. If so, we should be able to just call `SetDisconnectHandlerForTesting` every time and dispense with the member boolean.
How about we move to the constructor
if (id.has_value()) {
pending_receiver_count_++;
}Emily AndrewsIn test environments, will `BindWebNNContextProvider` ever fail in practice? If not, we should assert that `id.has_value` is true.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |