ASSERT(m_state == Open);
This happens because the stream can be unprepared to sending data yet (e.g. if read stream open callback arrived before the write one) and WebSocketChannel mistakenly treats zero return from platformSend() as an error - even though it just means that data was queued for later sending. So, the channel closes and destroys the handle.
Created attachment 44582 [details]
style-queue ran check-webkit-style on attachment 44582 [details] without any errors.
Just fyi, typo in changelog: s/zero if returned/zero is returned/
Comment on attachment 44582 [details]
Committed revision 51934.