Diff
Modified: trunk/Source/WebKit/ChangeLog (277676 => 277677)
--- trunk/Source/WebKit/ChangeLog 2021-05-18 20:59:35 UTC (rev 277676)
+++ trunk/Source/WebKit/ChangeLog 2021-05-18 21:04:30 UTC (rev 277677)
@@ -1,3 +1,32 @@
+2021-05-18 Ryosuke Niwa <rn...@webkit.org>
+
+ Enabling IPC testing API should prevent WebContent process from getting terminated in more cases
+ https://bugs.webkit.org/show_bug.cgi?id=225906
+ <rdar://problem/78138794>
+
+ Rebaselined the tests.
+
+ * 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-05-18 Alex Christensen <achristen...@webkit.org>
Unreviewed, reverting r277614.
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp (277676 => 277677)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp 2021-05-18 20:59:35 UTC (rev 277676)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp 2021-05-18 21:04:30 UTC (rev 277677)
@@ -50,6 +50,10 @@
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp (277676 => 277677)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp 2021-05-18 20:59:35 UTC (rev 277676)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp 2021-05-18 21:04:30 UTC (rev 277677)
@@ -42,6 +42,10 @@
return IPC::handleMessage<Messages::TestWithImageData::SendImageData>(decoder, this, &TestWithImageData::sendImageData);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
}
@@ -53,6 +57,10 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return false;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
return false;
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp (277676 => 277677)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp 2021-05-18 20:59:35 UTC (rev 277676)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp 2021-05-18 21:04:30 UTC (rev 277677)
@@ -131,6 +131,10 @@
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
}
@@ -154,6 +158,10 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return false;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
return false;
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp (277676 => 277677)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp 2021-05-18 20:59:35 UTC (rev 277676)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp 2021-05-18 21:04:30 UTC (rev 277677)
@@ -39,6 +39,10 @@
return IPC::handleMessage<Messages::TestWithSemaphore::SendSemaphore>(decoder, this, &TestWithSemaphore::sendSemaphore);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
}
@@ -50,6 +54,10 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return false;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
return false;
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp (277676 => 277677)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp 2021-05-18 20:59:35 UTC (rev 277676)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp 2021-05-18 21:04:30 UTC (rev 277677)
@@ -39,6 +39,10 @@
return IPC::handleMessage<Messages::TestWithStreamBuffer::SendStreamBuffer>(decoder, this, &TestWithStreamBuffer::sendStreamBuffer);
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp (277676 => 277677)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp 2021-05-18 20:59:35 UTC (rev 277676)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp 2021-05-18 21:04:30 UTC (rev 277677)
@@ -56,6 +56,10 @@
#endif
UNUSED_PARAM(decoder);
UNUSED_PARAM(connection);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.connection().ignoreInvalidMessageForTesting())
+ return;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled stream message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp (277676 => 277677)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp 2021-05-18 20:59:35 UTC (rev 277676)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp 2021-05-18 21:04:30 UTC (rev 277677)
@@ -200,6 +200,10 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return false;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
return false;
}
Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp (277676 => 277677)
--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp 2021-05-18 20:59:35 UTC (rev 277676)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp 2021-05-18 21:04:30 UTC (rev 277677)
@@ -131,6 +131,10 @@
#endif
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
}
@@ -154,6 +158,10 @@
UNUSED_PARAM(connection);
UNUSED_PARAM(decoder);
UNUSED_PARAM(replyEncoder);
+#if ENABLE(IPC_TESTING_API)
+ if (connection.ignoreInvalidMessageForTesting())
+ return false;
+#endif // ENABLE(IPC_TESTING_API)
ASSERT_NOT_REACHED_WITH_MESSAGE("Unhandled synchronous message %s to %" PRIu64, description(decoder.messageName()), decoder.destinationID());
return false;
}