For WebSocket.send(blob) function, when blob data can't be loaded correctly(e.g. the File or Blob resource could not be found at the time the read was processed), WebSocket will fail the connection.
I don't think it is friendly, maybe add console message "blob data can't be loaded correctly" should be reasonable.
In my mind, if the blob data can't be loaded successfully, WebSocket object add error message to console, should not fail the connection, and then fetch the next blob to send.
What is your thought?
Created attachment 193503 [details]
Comment on attachment 193503 [details]
Attachment 193503 [details] did not pass mac-wk2-ews (mac-wk2):
New failing tests:
It seems the diff text can't be found from the output.
How to get the diff text?
Adding console message sounds good. But I object to your comment #1.
WebSocket API spec about the send operation says;
If the argument is a Blob object
... snip ... if the data cannot be sent, e.g. because it would need to be buffered but the buffer is full, the user agent must close the WebSocket connection with prejudice.
send method doesn't have a way to notify errors asynchronously. And the spec consistently requires to fail the connection when send operation is not succeeded. To send following data after failure make the upper layer protocol design difficult, I think.
(In reply to comment #5)
> Hi Li,
> Adding console message sounds good. But I object to your comment #1.
> To send following data after failure make the upper layer protocol design difficult, I think.
After a higher consideration, I think what you said is reasonable.
If we throw some packages away, it is really difficult to use the protocol.
Thanks for your comments.
And we can fix the console message issue, use the readable message to replace Integer value.
The bug is invalid, sorry for the noise.