Delay sending back to WebProcess WebSocket error message as done in NetworkSocketStream
Created attachment 406709 [details] Patch
Comment on attachment 406709 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406709&action=review > Source/WebKit/NetworkProcess/NetworkSocketChannel.h:94 > + String m_errorMessage; It would be nice if we could make a version of Timer::startOneShot that takes a lambda so these could be in a lambda capture instead of members of this object. > Source/WebKit/NetworkProcess/NetworkSocketChannel.h:95 > + Optional<std::pair<unsigned short, String>> m_closeInfo; Could we make this uint16_t?
(In reply to Alex Christensen from comment #2) > Comment on attachment 406709 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=406709&action=review > > > Source/WebKit/NetworkProcess/NetworkSocketChannel.h:94 > > + String m_errorMessage; > > It would be nice if we could make a version of Timer::startOneShot that > takes a lambda so these could be in a lambda capture instead of members of > this object. Agreed, but here we have two call sites, one for the error message and one for code and reason. > > Source/WebKit/NetworkProcess/NetworkSocketChannel.h:95 > > + Optional<std::pair<unsigned short, String>> m_closeInfo; > > Could we make this uint16_t? We probably could since it is an unsigned short for WebIDL as well. But this would not be very consistent with other parts of the WebSocket implementation.
Committed r265814: <https://trac.webkit.org/changeset/265814> All reviewed patches have been landed. Closing bug and clearing flags on attachment 406709 [details].
<rdar://problem/67327819>