WebKit Bugzilla
Attachment 373017 Details for
Bug 199265
: [SOUP] WebSockets: runtime critical warning when closing the connection in some cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
wk2-soup-socket-close.diff (text/plain), 1.68 KB, created by
Carlos Garcia Campos
on 2019-06-27 04:51:38 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2019-06-27 04:51:38 PDT
Size:
1.68 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index b1a5ad2d43e..5820c05a480 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,15 @@ >+2019-06-27 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [SOUP] WebSockets: runtime critical warning when closing the connection in some cases >+ https://bugs.webkit.org/show_bug.cgi?id=199265 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Ensure the connection is still open before calling soup_websocket_connection_close(). >+ >+ * NetworkProcess/soup/WebSocketTaskSoup.cpp: >+ (WebKit::WebSocketTask::close): >+ > 2019-06-27 Carlos Garcia Campos <cgarcia@igalia.com> > > WebSockets: add support for sending blob messages when using web sockets platform APIs >diff --git a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp >index b8b268eec85..0469e225597 100644 >--- a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp >+++ b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp >@@ -156,12 +156,14 @@ void WebSocketTask::close(int32_t code, const String& reason) > if (m_receivedDidClose) > return; > >- if (m_connection) >- soup_websocket_connection_close(m_connection.get(), code, reason.utf8().data()); >- else { >+ if (!m_connection) { > g_cancellable_cancel(m_cancellable.get()); > didClose(code ? code : SOUP_WEBSOCKET_CLOSE_ABNORMAL, reason); >+ return; > } >+ >+ if (soup_websocket_connection_get_state(m_connection.get()) == SOUP_WEBSOCKET_STATE_OPEN) >+ soup_websocket_connection_close(m_connection.get(), code, reason.utf8().data()); > } > > void WebSocketTask::cancel()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mcatanzaro
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199265
: 373017