Diff
Modified: trunk/Source/WebKit/ChangeLog (275654 => 275655)
--- trunk/Source/WebKit/ChangeLog 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/ChangeLog 2021-04-08 08:58:24 UTC (rev 275655)
@@ -1,3 +1,36 @@
+2021-04-08 Kimmo Kinnunen <kkinnu...@apple.com>
+
+ Difficult to understand which IPC message caused an ASSERT due to being not handled
+ https://bugs.webkit.org/show_bug.cgi?id=224269
+
+ Reviewed by Chris Dumez.
+
+ Add the message name and destination ID to the assertion message about
+ unhandled IPC message.
+
+ * Scripts/webkit/messages.py:
+ (generate_message_handler):
+ * Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp:
+ (WebKit::TestWithIfMessage::didReceiveMessage):
+ * Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp:
+ (WebKit::TestWithImageData::didReceiveMessage):
+ (WebKit::TestWithImageData::didReceiveSyncMessage):
+ * Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:
+ (WebKit::TestWithLegacyReceiver::didReceiveTestWithLegacyReceiverMessage):
+ (WebKit::TestWithLegacyReceiver::didReceiveSyncTestWithLegacyReceiverMessage):
+ * Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:
+ (WebKit::TestWithSemaphore::didReceiveMessage):
+ (WebKit::TestWithSemaphore::didReceiveSyncMessage):
+ * Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp:
+ (WebKit::TestWithStreamBuffer::didReceiveMessage):
+ * Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:
+ (WebKit::TestWithStream::didReceiveStreamMessage):
+ * Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp:
+ (WebKit::TestWithSuperclass::didReceiveSyncMessage):
+ * Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:
+ (WebKit::TestWithoutAttributes::didReceiveMessage):
+ (WebKit::TestWithoutAttributes::didReceiveSyncMessage):
+
2021-04-02 Darin Adler <da...@apple.com>
Use Hasher more, remove IntegerHasher, fix hashing-related mistakes
Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (275654 => 275655)
--- trunk/Source/WebKit/Scripts/webkit/messages.py 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py 2021-04-08 08:58:24 UTC (rev 275655)
@@ -949,7 +949,7 @@
else:
result.append(' UNUSED_PARAM(decoder);\n')
result.append(' UNUSED_PARAM(connection);\n')
- result.append(' ASSERT_NOT_REACHED();\n')
+ result.append(' ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled stream message %s to %llu", description(decoder.messageName()), decoder.destinationID());\n')
result.append('}\n')
elif async_messages or receiver.has_attribute(WANTS_DISPATCH_MESSAGE_ATTRIBUTE) or receiver.has_attribute(WANTS_ASYNC_DISPATCH_MESSAGE_ATTRIBUTE):
receive_variant = receiver.name if receiver.has_attribute(LEGACY_RECEIVER_ATTRIBUTE) else ''
@@ -968,7 +968,7 @@
else:
result.append(' UNUSED_PARAM(connection);\n')
result.append(' UNUSED_PARAM(decoder);\n')
- result.append(' ASSERT_NOT_REACHED();\n')
+ result.append(' ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %llu", description(decoder.messageName()), decoder.destinationID());\n')
result.append('}\n')
if not receiver.has_attribute(STREAM_ATTRIBUTE) and (sync_messages or receiver.has_attribute(WANTS_DISPATCH_MESSAGE_ATTRIBUTE)):
@@ -984,7 +984,7 @@
result.append(' UNUSED_PARAM(connection);\n')
result.append(' UNUSED_PARAM(decoder);\n')
result.append(' UNUSED_PARAM(replyEncoder);\n')
- result.append(' ASSERT_NOT_REACHED();\n')
+ result.append(' ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %llu", description(decoder.messageName()), decoder.destinationID());\n')
result.append(' return false;\n')
result.append('}\n')
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp (275654 => 275655)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp 2021-04-08 08:58:24 UTC (rev 275655)
@@ -50,7 +50,7 @@
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %llu", description(decoder.messageName()), decoder.destinationID());
}
} // namespace WebKit
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp (275654 => 275655)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp 2021-04-08 08:58:24 UTC (rev 275655)
@@ -42,7 +42,7 @@
return IPC::handleMessage<Messages::TestWithImageData::SendImageData>(decoder, this, &TestWithImageData::sendImageData);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %llu", description(decoder.messageName()), decoder.destinationID());
}
bool TestWithImageData::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, UniqueRef<IPC::Encoder>& replyEncoder)
@@ -53,7 +53,7 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %llu", description(decoder.messageName()), decoder.destinationID());
return false;
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp (275654 => 275655)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp 2021-04-08 08:58:24 UTC (rev 275655)
@@ -131,7 +131,7 @@
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %llu", description(decoder.messageName()), decoder.destinationID());
}
bool TestWithLegacyReceiver::didReceiveSyncTestWithLegacyReceiverMessage(IPC::Connection& connection, IPC::Decoder& decoder, UniqueRef<IPC::Encoder>& replyEncoder)
@@ -154,7 +154,7 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %llu", description(decoder.messageName()), decoder.destinationID());
return false;
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp (275654 => 275655)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp 2021-04-08 08:58:24 UTC (rev 275655)
@@ -39,7 +39,7 @@
return IPC::handleMessage<Messages::TestWithSemaphore::SendSemaphore>(decoder, this, &TestWithSemaphore::sendSemaphore);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %llu", description(decoder.messageName()), decoder.destinationID());
}
bool TestWithSemaphore::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, UniqueRef<IPC::Encoder>& replyEncoder)
@@ -50,7 +50,7 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %llu", description(decoder.messageName()), decoder.destinationID());
return false;
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp (275654 => 275655)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp 2021-04-08 08:58:24 UTC (rev 275655)
@@ -39,7 +39,7 @@
return IPC::handleMessage<Messages::TestWithStreamBuffer::SendStreamBuffer>(decoder, this, &TestWithStreamBuffer::sendStreamBuffer);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %llu", description(decoder.messageName()), decoder.destinationID());
}
} // namespace WebKit
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp (275654 => 275655)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp 2021-04-08 08:58:24 UTC (rev 275655)
@@ -56,7 +56,7 @@
#endif
UNUSED_PARAM(decoder);
UNUSED_PARAM(connection);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled stream message %s to %llu", description(decoder.messageName()), decoder.destinationID());
}
} // namespace WebKit
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp (275654 => 275655)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp 2021-04-08 08:58:24 UTC (rev 275655)
@@ -200,7 +200,7 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %llu", description(decoder.messageName()), decoder.destinationID());
return false;
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp (275654 => 275655)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp 2021-04-08 08:38:57 UTC (rev 275654)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp 2021-04-08 08:58:24 UTC (rev 275655)
@@ -131,7 +131,7 @@
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %llu", description(decoder.messageName()), decoder.destinationID());
}
bool TestWithoutAttributes::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, UniqueRef<IPC::Encoder>& replyEncoder)
@@ -154,7 +154,7 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
- ASSERT_NOT_REACHED();
+ ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %llu", description(decoder.messageName()), decoder.destinationID());
return false;
}