Skip to content

Commit

Permalink
Add RELEASE_LOG_FAULT when message checks fail in service worker and …
Browse files Browse the repository at this point in the history
…shared worker connections

https://bugs.webkit.org/show_bug.cgi?id=255037
rdar://107665814

Reviewed by Youenn Fablet.

This will help us notice and fix problems based on telemetry and logs.

* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
* Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.cpp:

Canonical link: https://commits.webkit.org/262628@main
  • Loading branch information
achristensen07 committed Apr 5, 2023
1 parent b15ce8a commit f819105
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Expand Up @@ -73,6 +73,7 @@ using namespace WebCore;
#define CONNECTION_MESSAGE_CHECK_COMPLETION(assertion, completion) do { \
ASSERT(assertion); \
if (UNLIKELY(!(assertion))) { \
RELEASE_LOG_FAULT(IPC, __FILE__ " " CONNECTION_STRINGIFY_MACRO(__LINE__) ": Invalid message dispatched %" PUBLIC_LOG_STRING, WTF_PRETTY_FUNCTION); \
m_networkProcess->parentProcessConnection()->send(Messages::NetworkProcessProxy::TerminateWebProcess(identifier()), 0); \
{ completion; } \
return; \
Expand Down
Expand Up @@ -43,6 +43,7 @@ namespace WebKit {
#define CONNECTION_MESSAGE_CHECK_COMPLETION(assertion, completion) do { \
ASSERT(assertion); \
if (UNLIKELY(!(assertion))) { \
RELEASE_LOG_FAULT(IPC, __FILE__ " " CONNECTION_STRINGIFY_MACRO(__LINE__) ": Invalid message dispatched %" PUBLIC_LOG_STRING, WTF_PRETTY_FUNCTION); \
m_networkProcess->parentProcessConnection()->send(Messages::NetworkProcessProxy::TerminateWebProcess(m_webProcessIdentifier), 0); \
{ completion; } \
return; \
Expand Down

0 comments on commit f819105

Please sign in to comment.